Merge pull request #12989 from izeye:rename-nested-auto-configuration

* pr/12989:
  Rename nested *AutoConfiguration classes to *Configuration
pull/13061/head
Stephane Nicoll 7 years ago
commit 71c26300fb

@ -138,7 +138,7 @@ public class WebEndpointAutoConfiguration {
@Configuration @Configuration
@ConditionalOnWebApplication(type = Type.SERVLET) @ConditionalOnWebApplication(type = Type.SERVLET)
static class WebEndpointServletAutoConfiguration { static class WebEndpointServletConfiguration {
@Bean @Bean
@ConditionalOnMissingBean(ServletEndpointsSupplier.class) @ConditionalOnMissingBean(ServletEndpointsSupplier.class)

@ -132,7 +132,7 @@ public class IntegrationAutoConfiguration {
*/ */
@ConditionalOnMissingBean(GatewayProxyFactoryBean.class) @ConditionalOnMissingBean(GatewayProxyFactoryBean.class)
@Import(IntegrationAutoConfigurationScanRegistrar.class) @Import(IntegrationAutoConfigurationScanRegistrar.class)
protected static class IntegrationComponentScanAutoConfiguration { protected static class IntegrationComponentScanConfiguration {
} }

@ -24,7 +24,7 @@ import org.junit.rules.ExpectedException;
import org.springframework.beans.DirectFieldAccessor; import org.springframework.beans.DirectFieldAccessor;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration.IntegrationComponentScanAutoConfiguration; import org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration.IntegrationComponentScanConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration; import org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration;
import org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration;
@ -70,18 +70,18 @@ public class IntegrationAutoConfigurationTests {
this.contextRunner.run((context) -> { this.contextRunner.run((context) -> {
assertThat(context).hasSingleBean(TestGateway.class); assertThat(context).hasSingleBean(TestGateway.class);
assertThat(context) assertThat(context)
.hasSingleBean(IntegrationComponentScanAutoConfiguration.class); .hasSingleBean(IntegrationComponentScanConfiguration.class);
}); });
} }
@Test @Test
public void explicitIntegrationComponentScan() { public void explicitIntegrationComponentScan() {
this.contextRunner this.contextRunner
.withUserConfiguration(IntegrationComponentScanConfiguration.class) .withUserConfiguration(CustomIntegrationComponentScanConfiguration.class)
.run((context) -> { .run((context) -> {
assertThat(context).hasSingleBean(TestGateway.class); assertThat(context).hasSingleBean(TestGateway.class);
assertThat(context).doesNotHaveBean( assertThat(context).doesNotHaveBean(
IntegrationComponentScanAutoConfiguration.class); IntegrationComponentScanConfiguration.class);
}); });
} }
@ -223,7 +223,7 @@ public class IntegrationAutoConfigurationTests {
@Configuration @Configuration
@IntegrationComponentScan @IntegrationComponentScan
static class IntegrationComponentScanConfiguration { static class CustomIntegrationComponentScanConfiguration {
} }

@ -53,7 +53,7 @@ public class RestDocsAutoConfiguration {
@ConditionalOnClass(MockMvcRestDocumentation.class) @ConditionalOnClass(MockMvcRestDocumentation.class)
@ConditionalOnWebApplication(type = Type.SERVLET) @ConditionalOnWebApplication(type = Type.SERVLET)
@EnableConfigurationProperties(RestDocsProperties.class) @EnableConfigurationProperties(RestDocsProperties.class)
static class RestDocsMockMvcAutoConfiguration { static class RestDocsMockMvcConfiguration {
@Bean @Bean
@ConditionalOnMissingBean @ConditionalOnMissingBean
@ -85,7 +85,7 @@ public class RestDocsAutoConfiguration {
@ConditionalOnClass({ RequestSpecification.class, @ConditionalOnClass({ RequestSpecification.class,
RestAssuredRestDocumentation.class }) RestAssuredRestDocumentation.class })
@EnableConfigurationProperties(RestDocsProperties.class) @EnableConfigurationProperties(RestDocsProperties.class)
static class RestDocsRestAssuredAutoConfiguration { static class RestDocsRestAssuredConfiguration {
@Bean @Bean
@ConditionalOnMissingBean @ConditionalOnMissingBean
@ -114,7 +114,7 @@ public class RestDocsAutoConfiguration {
@ConditionalOnClass(WebTestClientRestDocumentation.class) @ConditionalOnClass(WebTestClientRestDocumentation.class)
@ConditionalOnWebApplication(type = Type.REACTIVE) @ConditionalOnWebApplication(type = Type.REACTIVE)
@EnableConfigurationProperties(RestDocsProperties.class) @EnableConfigurationProperties(RestDocsProperties.class)
static class RestDocsWebTestClientAutoConfiguration { static class RestDocsWebTestClientConfiguration {
@Bean @Bean
@ConditionalOnMissingBean @ConditionalOnMissingBean

Loading…
Cancel
Save