From 5a52b36ec70c66d8b6b0b57b6a66a8092a38091e Mon Sep 17 00:00:00 2001 From: dugenkui03 Date: Thu, 24 Feb 2022 00:51:02 +0800 Subject: [PATCH 1/2] Remove redundant ResourceLoaders from GraphQL auto-configuration See gh-29976 --- .../graphql/reactive/GraphQlWebFluxAutoConfiguration.java | 5 +++-- .../graphql/servlet/GraphQlWebMvcAutoConfiguration.java | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfiguration.java index bfc3d604e6..db48f0d8ce 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfiguration.java @@ -102,8 +102,9 @@ public class GraphQlWebFluxAutoConfiguration { } @Bean - public RouterFunction graphQlEndpoint(GraphQlHttpHandler httpHandler, GraphQlSource graphQlSource, - GraphQlProperties properties, ResourceLoader resourceLoader) { + public RouterFunction graphQlEndpoint(GraphQlHttpHandler httpHandler, + GraphQlSource graphQlSource, + GraphQlProperties properties) { String path = properties.getPath(); logger.info(LogMessage.format("GraphQL endpoint HTTP POST %s", path)); RouterFunctions.Builder builder = RouterFunctions.route(); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfiguration.java index 55009f7687..4021fcded6 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfiguration.java @@ -41,7 +41,6 @@ import org.springframework.boot.autoconfigure.http.HttpMessageConverters; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.core.io.ResourceLoader; import org.springframework.core.log.LogMessage; import org.springframework.graphql.GraphQlService; import org.springframework.graphql.execution.GraphQlSource; @@ -106,7 +105,7 @@ public class GraphQlWebMvcAutoConfiguration { @Bean public RouterFunction graphQlRouterFunction(GraphQlHttpHandler httpHandler, - GraphQlSource graphQlSource, GraphQlProperties properties, ResourceLoader resourceLoader) { + GraphQlSource graphQlSource, GraphQlProperties properties) { String path = properties.getPath(); logger.info(LogMessage.format("GraphQL endpoint HTTP POST %s", path)); RouterFunctions.Builder builder = RouterFunctions.route(); From 19b5431ba4ab74f8368848c92077172a37492191 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 24 Feb 2022 12:29:56 +0000 Subject: [PATCH 2/2] Polish "Remove redundant ResourceLoaders from GraphQL auto-configuration" See gh-29976 --- .../graphql/reactive/GraphQlWebFluxAutoConfiguration.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfiguration.java index db48f0d8ce..e781b07175 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/reactive/GraphQlWebFluxAutoConfiguration.java @@ -38,7 +38,6 @@ import org.springframework.boot.autoconfigure.graphql.GraphQlProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.core.io.ResourceLoader; import org.springframework.core.log.LogMessage; import org.springframework.graphql.GraphQlService; import org.springframework.graphql.execution.GraphQlSource; @@ -102,8 +101,7 @@ public class GraphQlWebFluxAutoConfiguration { } @Bean - public RouterFunction graphQlEndpoint(GraphQlHttpHandler httpHandler, - GraphQlSource graphQlSource, + public RouterFunction graphQlEndpoint(GraphQlHttpHandler httpHandler, GraphQlSource graphQlSource, GraphQlProperties properties) { String path = properties.getPath(); logger.info(LogMessage.format("GraphQL endpoint HTTP POST %s", path));