mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Rename MetricDataSourceAutoConfiguration
Rename MetricDataSourceAutoConfiguration to DataSourceMetricsAutoConfiguration
This commit is contained in:
parent
adbded33ff
commit
169a46b1aa
@ -39,7 +39,7 @@ import org.springframework.context.annotation.Import;
|
||||
@ConditionalOnBean(DataSource.class)
|
||||
@AutoConfigureAfter(DataSourceAutoConfiguration.class)
|
||||
@Import(DataSourceMetadataProvidersConfiguration.class)
|
||||
public class MetricDataSourceAutoConfiguration {
|
||||
public class DataSourceMetricsAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
@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) {
|
||||
int suffixLength = DATASOURCE_SUFFIX.length();
|
||||
|
@ -1,6 +1,7 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
org.springframework.boot.actuate.autoconfigure.AuditAutoConfiguration,\
|
||||
org.springframework.boot.actuate.autoconfigure.CrshAutoConfiguration,\
|
||||
org.springframework.boot.actuate.autoconfigure.DataSourceMetricsAutoConfiguration,\
|
||||
org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration,\
|
||||
org.springframework.boot.actuate.autoconfigure.EndpointMBeanExportAutoConfiguration,\
|
||||
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.ManagementSecurityAutoConfiguration,\
|
||||
org.springframework.boot.actuate.autoconfigure.ManagementServerPropertiesAutoConfiguration,\
|
||||
org.springframework.boot.actuate.autoconfigure.MetricDataSourceAutoConfiguration,\
|
||||
org.springframework.boot.actuate.autoconfigure.MetricFilterAutoConfiguration,\
|
||||
org.springframework.boot.actuate.autoconfigure.MetricRepositoryAutoConfiguration,\
|
||||
org.springframework.boot.actuate.autoconfigure.TraceRepositoryAutoConfiguration,\
|
||||
|
@ -46,9 +46,11 @@ import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
/**
|
||||
* Tests for {@link DataSourceMetricsAutoConfiguration}.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
public class MetricDataSourceAutoConfigurationTests {
|
||||
public class DataSourceMetricsAutoConfigurationTests {
|
||||
|
||||
private AnnotationConfigApplicationContext context;
|
||||
|
||||
@ -134,7 +136,7 @@ public class MetricDataSourceAutoConfigurationTests {
|
||||
if (config.length > 0) {
|
||||
this.context.register(config);
|
||||
}
|
||||
this.context.register(MetricDataSourceAutoConfiguration.class);
|
||||
this.context.register(DataSourceMetricsAutoConfiguration.class);
|
||||
this.context.refresh();
|
||||
}
|
||||
|
||||
@ -193,4 +195,5 @@ public class MetricDataSourceAutoConfigurationTests {
|
||||
return DataSourceBuilder.create().driverClassName("org.hsqldb.jdbc.JDBCDriver")
|
||||
.url("jdbc:hsqldb:mem:test").username("sa");
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user