Spring Boot graphQl 自动配置无法在应用程序启动时实例化 graphQlSource

问题描述 投票:0回答:1

我有一个使用 spring-webflux 和 spring-graphql 的 Spring Boot 应用程序。启动时,自动配置机制无法实例化 graphQlSource bean,因为它无法在其底层依赖项中运行工厂方法:

Factory method 'graphQlSource' threw exception with message: Error creating bean with name 'annotatedControllerConfigurerDataFetcherExceptionResolver' defined in class path resource [org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfiguration.class]: Unsatisfied dependency expressed through method 'annotatedControllerConfigurerDataFetcherExceptionResolver' parameter 0: Error creating bean with name 'annotatedControllerConfigurer' defined in class path resource [org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfiguration.class]: Error creating bean with name 'cursorStrategy' defined in class path resource [org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfiguration$GraphQlDataAutoConfiguration.class]: **Failed to instantiate [org.springframework.graphql.data.pagination.EncodingCursorStrategy]: Factory method 'cursorStrategy' threw exception with message: com/fasterxml/jackson/annotation/JsonTypeInfo$Value","logger":"org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext"}**

我盯着 Maven 依赖关系树,找不到是什么 lib 不兼容造成了这个问题。 以下是我正在使用的版本: 春季启动3.1.7 Spring WebFlux 6.0.15 Spring GraphQl 1.2.4(通过 spring-boot-starter-graphql 3.1.7)

spring spring-boot graphql spring-webflux
1个回答
0
投票

问题已解决:我的模式中的类型有一个名为“值”的字段,模式解析器不喜欢该字段

© www.soinside.com 2019 - 2024. All rights reserved.