[英]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.