From ef4add27f07feada23f6f4d878ddca5ad6ec3696 Mon Sep 17 00:00:00 2001 From: rstoyanchev Date: Thu, 3 Feb 2022 10:41:35 +0000 Subject: [PATCH] Do not set ConversionService on AnnotatedControllerConfigurer After https://github.com/spring-projects/spring-graphql/commit/0b449d89e1d9e8754d42ad5e5af7f780c705ce32, the ConversionService on AnnotatedControllerConfigurer is an internally managed instance that is customized with FormatterRegistrar rather than set. Closes gh-29636 --- .../boot/autoconfigure/graphql/GraphQlAutoConfiguration.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfiguration.java index f12d28c8b0a..6ff1a923770 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfiguration.java @@ -39,7 +39,6 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties import org.springframework.context.annotation.Bean; import org.springframework.core.io.Resource; import org.springframework.core.io.support.ResourcePatternResolver; -import org.springframework.format.support.DefaultFormattingConversionService; import org.springframework.graphql.GraphQlService; import org.springframework.graphql.data.method.annotation.support.AnnotatedControllerConfigurer; import org.springframework.graphql.execution.BatchLoaderRegistry; @@ -130,9 +129,7 @@ public class GraphQlAutoConfiguration { @Bean @ConditionalOnMissingBean public AnnotatedControllerConfigurer annotatedControllerConfigurer() { - AnnotatedControllerConfigurer annotatedControllerConfigurer = new AnnotatedControllerConfigurer(); - annotatedControllerConfigurer.setConversionService(new DefaultFormattingConversionService()); - return annotatedControllerConfigurer; + return new AnnotatedControllerConfigurer(); } private List toList(ObjectProvider provider) {