简体   繁体   English

为什么我会收到与使用 graphql-spqr-spring-boot-starter 的“类型名称冲突”相关的警告?

[英]Why am I getting a warning related to 'type name collision' using graphql-spqr-spring-boot-starter?

Could someone please help me here, I'm getting a warning something related to 'type name collision' as follows.有人可以在这里帮助我吗,我收到与“类型名称冲突”相关的警告,如下所示。 I'm using graphql-spqr-spring-boot-starter.我正在使用 graphql-spqr-spring-boot-starter。

2020-06-06 19:04:15.972  WARN 22428 --- [           main] i.l.graphql.generator.OperationMapper    : Potential type name collision detected: 'String' bound to multiple types: java.lang.String (loaded by the bootstrap class loader) and @javax.validation.Valid() java.lang.String (loaded by the bootstrap class loader). Assign unique names using the appropriate annotations or override the TypeInfoGenerator. For details and solutions see https://github.com/leangen/graphql-spqr/wiki/Errors#non-unique-type-name. If this warning is a false positive, please report it: https://github.com/leangen/graphql-spqr/issues.

I referred to the page https://github.com/leangen/graphql-spqr/wiki/Errors#non-unique-type-name but couldn't find/understand how to fix it.我参考了页面https://github.com/leangen/graphql-spqr/wiki/Errors#non-unique-type-name但无法找到/理解如何修复它。 I'm new to graphql, anyone's help would be much appreciated.我是 graphql 的新手,非常感谢任何人的帮助。

Based on this your warning is benign.基于,您的警告是良性的。

If two different types end up with the same name, it will log a warning.如果两种不同的类型最终具有相同的名称,它将记录一个警告。 A type is a fully qualified annotated, generic type.类型是完全限定的带注释的泛型类型。 So even a single annotation differing is enough to trigger it.因此,即使是一个不同的注释也足以触发它。 In your case, String and @Valid String are different types.在您的情况下, String@Valid String是不同的类型。 The reasoning is that annotations can influence the mapping.原因是注释可以影响映射。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 spring-spqr graphql-spqr-spring-boot-starter graphQL 的注释创建片段 - how to create fragments using Annotations of spring-spqr graphql-spqr-spring-boot-starter graphQL 我们如何从 GraphQL 的 RequestContextHolder 中获取 GraphQL 的 HttpServletRequest(DefaultGlobalContext)(使用 graphql-spqr-spring-boot-starter)? - How can we get HttpServletRequest(DefaultGlobalContext) for GraphQL from RequestContextHolder for GraphQL (using graphql-spqr-spring-boot-starter)? 如何使用 spqr-spring-boot-starter 在 graphql 中获取模式文件? - How to get a schema file in graphql using spqr-spring-boot-starter? 带有 Spring Boot 和事务边界的 graphql-spqr - graphql-spqr with Spring Boot and Transactional Boundary 为什么我在添加 spring-boot-starter-security 依赖项时在 pom.xml 文件中出现未知错误? - Why I am getting an unknown error in pom.xml file when I add the spring-boot-starter-security dependency? 在 spring 启动 graphql 启动器中等效的 Kickstarter 类型字典 - Kickstarter type dictionary equivalent in spring boot graphql starter spring boot starter graphql无法正常工作 - spring boot starter graphql not working 第一次在 eclipse 中运行 spring 启动应用程序时,我收到错误警告。 我正在使用 JDK 14 - I am getting error warning while running first time spring boot application in eclipse. I am using JDK 14 为什么我在 Spring 引导中收到“JSONObject 类型的方法 stringToValue(String) 未定义” - Why I am getting “The method stringToValue(String) is undefined for the type JSONObject” in Spring Boot 为什么我的 Spring Boot 应用程序出现异常? - Why am I getting exception in my Spring Boot Application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM