小编tor*_*don的帖子

在配置的位置下找不到任何 GraphQL 模式文件 - SpringBoot 、 GraphQL

我正在尝试使用 GraphQL 在 spring-boot 上运行空项目,但出现以下错误。

2022-01-03 12:33:11.440 ERROR 12944 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Could not find any GraphQL schema file under configured locations.

Action:

Check that the following locations contain schema files: 
- '' (classpath:graphql/**/)
Run Code Online (Sandbox Code Playgroud)

依赖项:

  • spring-boot-starter-graphql
  • spring-boot-启动器-web

方案 - /resources/schema.graphqls

type Query {
  bookById(id: ID): Book
}

type Book {
  id: ID
  name: String
  pageCount: Int
  author: Author
}

type Author {
  id: ID
  firstName: String
  lastName: String
}
Run Code Online (Sandbox Code Playgroud)

是否有配置错误?

spring-boot graphql

1
推荐指数
1
解决办法
3622
查看次数

重试 Spring @HttpExchange

我使用Spring-boot-3 @GetExchangea WebClient,有时会遇到以下错误:

java.lang.IllegalStateException: Timeout on blocking read for 5000000000 NANOSECONDS
Run Code Online (Sandbox Code Playgroud)

如果使用来@GetExchange指示WebClient重试,最佳实践是什么?这个新注释没有足够的文档。

java spring webclient spring-boot

1
推荐指数
1
解决办法
996
查看次数

标签 统计

spring-boot ×2

graphql ×1

java ×1

spring ×1

webclient ×1