我使用带有图QL的,并且在为抽象类从Db获取数据时面临一个问题。请查找以下细节。
@Data
public static class Employee<T extends Account> {
private String name;
private T account;
}
@Data
public static abstract class Account {
}
@Data
public static class CurrentAccount extends Account {
我使用GraphQLTestTemplate来模拟查询的响应。
@RunWith(SpringRunner.class)
@GraphQLTest
public class UnitTest {
@Autowired
private GraphQLTestTemplate graphQlTestTemplate ;
}
当我运行单元测试时,它给了我错误:org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.graphql.spri
我的研究表明,当发生类似item1.setOptions(item2.getOptions())的事情时,会发生此错误。解决方案通常建议搜索和删除类似的内容。在我自己的代码中,我从来没有调用过Item.setOptions,所以在我看来,无论是什么原因,都必须在Spring或其他代码中。如何防止它造成此错误?
我试图将GraphQL应用于具有多到多映射的特定数据模型。我有两门课,简化如下:
@Entity
@Data
@NoArgsConstructor
@Table(name="items_table")
public class Item implements Serial
我的应用程序不会启动,而且似乎存在依赖冲突。我不知道是什么依赖导致了冲突,也不知道如何解决这个问题。
这是我尝试启动spring应用程序时的消息。
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
com.coxautodev
有人知道如何在使用graphql-spring-boot (https://github.com/graphql-java-kickstart/graphql-spring-boot)时向GraphQL执行添加指令插入吗?我知道如何使用普通的graphql-java:https://www.graphql-java.com/documentation/v13/instrumentation/实现这一点 但是,当使用graphql-spring-boot并控制执行时,我不知道该怎么做。由于缺乏文档,我简单地尝试了一下: @Service
public class GraphQLInstrume
当使用带有spring的启动框架时,Java如何正确地在GraphQL中注册?
在简单的Java应用程序中尝试使用具有等效Java的GraphQL模式枚举时,将引发以下异常:
Caused by: graphql.kickstart.tools.SchemaError: Expected enum with name 'CarType' but found none!
at graphql.kickstart.tools.SchemaParser.createEnumObject(SchemaParser.kt:191)
at graphql.kickstart.tools.S
我在一个SpringBoot应用程序中使用Hibernate search 11.5.2。
我正在尝试搜索实体Book的字段createdAt。
当我运行它时,应用程序退出,并出现如下异常
Unable to create bean for LocalDateBridge
对于Long类型的字段,我也得到了同样类型的异常
我的实体如下所示
@Indexed
@Entity
public class Book {
@Id
private Long id;
@Field
@DateBridge(resolution=Resolution.DAY)
pr
我目前正在学习Spring Boot和GraphQL。对于graphql,我使用的是graphql spqr库,并且遇到了graphql错误。我可以使用localhost:8080/gui通过我的graphql api进行查询和修改,但当我使用Postman或从我的前端进行呼叫时,我收到以下错误消息。在gui中,端点似乎仍然是/graphql,但是当我将相同的端点与Postman或axios一起使用时,我得到了错误。
graphql.AssertException: Object required to be not null
at graphql.Assert.assertNotNu