diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/client/RestClientAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/client/RestClientAutoConfiguration.java index b33fc882f94..1543caa80da 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/client/RestClientAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/client/RestClientAutoConfiguration.java @@ -59,7 +59,7 @@ public class RestClientAutoConfiguration { @Bean @Scope("prototype") @ConditionalOnMissingBean - public RestClient.Builder webClientBuilder(ObjectProvider customizerProvider) { + public RestClient.Builder restClientBuilder(ObjectProvider customizerProvider) { RestClient.Builder builder = RestClient.builder() .requestFactory(ClientHttpRequestFactories.get(ClientHttpRequestFactorySettings.DEFAULTS)); customizerProvider.orderedStream().forEach((customizer) -> customizer.customize(builder)); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/client/RestClientAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/client/RestClientAutoConfigurationTests.java index 368c29d88d6..b64a62d1f3c 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/client/RestClientAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/client/RestClientAutoConfigurationTests.java @@ -61,7 +61,7 @@ class RestClientAutoConfigurationTests { void restClientShouldApplyCustomizers() { this.contextRunner.withUserConfiguration(RestClientCustomizerConfig.class).run((context) -> { RestClient.Builder builder = context.getBean(RestClient.Builder.class); - RestClientCustomizer customizer = context.getBean("webClientCustomizer", RestClientCustomizer.class); + RestClientCustomizer customizer = context.getBean("restClientCustomizer", RestClientCustomizer.class); builder.build(); then(customizer).should().customize(any(RestClient.Builder.class)); }); @@ -80,7 +80,7 @@ class RestClientAutoConfigurationTests { void shouldNotCreateClientBuilderIfAlreadyPresent() { this.contextRunner.withUserConfiguration(CustomRestClientBuilderConfig.class).run((context) -> { RestClient.Builder builder = context.getBean(RestClient.Builder.class); - assertThat(builder).isInstanceOf(MyWebClientBuilder.class); + assertThat(builder).isInstanceOf(MyRestClientBuilder.class); }); } @@ -141,7 +141,7 @@ class RestClientAutoConfigurationTests { static class RestClientCustomizerConfig { @Bean - RestClientCustomizer webClientCustomizer() { + RestClientCustomizer restClientCustomizer() { return mock(RestClientCustomizer.class); } @@ -151,13 +151,13 @@ class RestClientAutoConfigurationTests { static class CustomRestClientBuilderConfig { @Bean - MyWebClientBuilder myWebClientBuilder() { - return mock(MyWebClientBuilder.class); + MyRestClientBuilder myRestClientBuilder() { + return mock(MyRestClientBuilder.class); } } - interface MyWebClientBuilder extends RestClient.Builder { + interface MyRestClientBuilder extends RestClient.Builder { }