Merge pull request #29976 from dugenkui03

* gh-29976:
  Polish "Remove redundant ResourceLoaders from GraphQL auto-configuration"
  Remove redundant ResourceLoaders from GraphQL auto-configuration

Closes gh-29976
pull/30016/head
Andy Wilkinson 3 years ago
commit 74726bddcf

@ -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;
@ -103,7 +102,7 @@ public class GraphQlWebFluxAutoConfiguration {
@Bean
public RouterFunction<ServerResponse> graphQlEndpoint(GraphQlHttpHandler httpHandler, GraphQlSource graphQlSource,
GraphQlProperties properties, ResourceLoader resourceLoader) {
GraphQlProperties properties) {
String path = properties.getPath();
logger.info(LogMessage.format("GraphQL endpoint HTTP POST %s", path));
RouterFunctions.Builder builder = RouterFunctions.route();

@ -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<ServerResponse> 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();

Loading…
Cancel
Save