Rename MetricDataSourceAutoConfiguration

Rename MetricDataSourceAutoConfiguration to
DataSourceMetricsAutoConfiguration
pull/1487/head
Phillip Webb 10 years ago
parent adbded33ff
commit 169a46b1aa

@ -39,7 +39,7 @@ import org.springframework.context.annotation.Import;
@ConditionalOnBean(DataSource.class) @ConditionalOnBean(DataSource.class)
@AutoConfigureAfter(DataSourceAutoConfiguration.class) @AutoConfigureAfter(DataSourceAutoConfiguration.class)
@Import(DataSourceMetadataProvidersConfiguration.class) @Import(DataSourceMetadataProvidersConfiguration.class)
public class MetricDataSourceAutoConfiguration { public class DataSourceMetricsAutoConfiguration {
@Bean @Bean
@ConditionalOnBean(DataSourceMetadataProvider.class) @ConditionalOnBean(DataSourceMetadataProvider.class)

@ -119,7 +119,7 @@ public class DataSourcePublicMetrics implements PublicMetrics {
} }
/** /**
* Specify if the given value ends with {@value #DATASOURCE_SUFFIX}. * Specify if the given value ends with {@code dataSource}.
*/ */
protected boolean endWithDataSource(String value) { protected boolean endWithDataSource(String value) {
int suffixLength = DATASOURCE_SUFFIX.length(); int suffixLength = DATASOURCE_SUFFIX.length();

@ -1,6 +1,7 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.boot.actuate.autoconfigure.AuditAutoConfiguration,\ org.springframework.boot.actuate.autoconfigure.AuditAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.CrshAutoConfiguration,\ org.springframework.boot.actuate.autoconfigure.CrshAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.DataSourceMetricsAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration,\ org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.EndpointMBeanExportAutoConfiguration,\ org.springframework.boot.actuate.autoconfigure.EndpointMBeanExportAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration,\ org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration,\
@ -8,7 +9,6 @@ org.springframework.boot.actuate.autoconfigure.HealthIndicatorAutoConfiguration,
org.springframework.boot.actuate.autoconfigure.JolokiaAutoConfiguration,\ org.springframework.boot.actuate.autoconfigure.JolokiaAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.ManagementSecurityAutoConfiguration,\ org.springframework.boot.actuate.autoconfigure.ManagementSecurityAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.ManagementServerPropertiesAutoConfiguration,\ org.springframework.boot.actuate.autoconfigure.ManagementServerPropertiesAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.MetricDataSourceAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.MetricFilterAutoConfiguration,\ org.springframework.boot.actuate.autoconfigure.MetricFilterAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.MetricRepositoryAutoConfiguration,\ org.springframework.boot.actuate.autoconfigure.MetricRepositoryAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.TraceRepositoryAutoConfiguration,\ org.springframework.boot.actuate.autoconfigure.TraceRepositoryAutoConfiguration,\

@ -46,9 +46,11 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
/** /**
* Tests for {@link DataSourceMetricsAutoConfiguration}.
*
* @author Stephane Nicoll * @author Stephane Nicoll
*/ */
public class MetricDataSourceAutoConfigurationTests { public class DataSourceMetricsAutoConfigurationTests {
private AnnotationConfigApplicationContext context; private AnnotationConfigApplicationContext context;
@ -134,7 +136,7 @@ public class MetricDataSourceAutoConfigurationTests {
if (config.length > 0) { if (config.length > 0) {
this.context.register(config); this.context.register(config);
} }
this.context.register(MetricDataSourceAutoConfiguration.class); this.context.register(DataSourceMetricsAutoConfiguration.class);
this.context.refresh(); this.context.refresh();
} }
@ -193,4 +195,5 @@ public class MetricDataSourceAutoConfigurationTests {
return DataSourceBuilder.create().driverClassName("org.hsqldb.jdbc.JDBCDriver") return DataSourceBuilder.create().driverClassName("org.hsqldb.jdbc.JDBCDriver")
.url("jdbc:hsqldb:mem:test").username("sa"); .url("jdbc:hsqldb:mem:test").username("sa");
} }
} }
Loading…
Cancel
Save