Работа с graphql-spqr и весенней загрузкой:
Пытаюсь запустить проект, но натолкнулся на это:
exception:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'graphQLSchema' defined in class path resource [io/leangen/graphql/spqr/spring/autoconfigure/SpqrAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [graphql.schema.GraphQLSchema]: Factory method 'graphQLSchema' threw exception; nested exception is io.leangen.graphql.metadata.exceptions.TypeMappingException: Multiple methods detected for operation "defaultInstanceForType" with different return types. Types found: [com.google.protobuf.Message, com.google.protobuf.MessageLite]. If this is intentional, and you wish GraphQL SPQR to infer the most common super type automatically, see https://github.com/leangen/graphql-spqr/wiki/Errors#operation-with-multiple-resolver-methods-of-different-types
и меня перенаправили на это для справки: https://github.com/leangen/graphql-spqr/wiki/Errors#operation -with-multiple-resolver-methods-of-different-types
У меня не было нескольких методов с тем же именем, которое запускает меня, URL-адрес в исключение бесполезно и даже не может быть отредактировано или прокомментировано.
Удаление полей protobuf Timestamp решает проблему!
После изменения моего возвращаемого объекта все сработало, мне пришлось выполнить рефакторинг com.google.protobuf.Timestamp на Date, LocalDate или даже String, и он отлично работает.
com.google.protobuf.Timestamp