@Configuration(proxyBeanMethods=false) @ConditionalOnClass(value={org.springframework.jdbc.core.JdbcTemplate.class,org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.class}) @ConditionalOnBean(value=javax.sql.DataSource.class) @ConditionalOnEnabledHealthIndicator(value="db") @AutoConfigureAfter(value=DataSourceAutoConfiguration.class) @EnableConfigurationProperties(value=DataSourceHealthIndicatorProperties.class) public class DataSourceHealthContributorAutoConfiguration extends Object implements InitializingBean
Constructor and Description |
---|
DataSourceHealthContributorAutoConfiguration(ObjectProvider<DataSourcePoolMetadataProvider> metadataProviders) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
HealthContributor |
dbHealthContributor(Map<String,DataSource> dataSources,
DataSourceHealthIndicatorProperties dataSourceHealthIndicatorProperties) |
public DataSourceHealthContributorAutoConfiguration(ObjectProvider<DataSourcePoolMetadataProvider> metadataProviders)
public void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
@Bean @ConditionalOnMissingBean(name={"dbHealthIndicator","dbHealthContributor"}) public HealthContributor dbHealthContributor(Map<String,DataSource> dataSources, DataSourceHealthIndicatorProperties dataSourceHealthIndicatorProperties)