@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) public class DataSourceHealthContributorAutoConfiguration extends CompositeHealthContributorConfiguration<DataSourceHealthIndicator,DataSource> implements org.springframework.beans.factory.InitializingBean
Constructor and Description |
---|
DataSourceHealthContributorAutoConfiguration(Map<String,DataSource> dataSources,
org.springframework.beans.factory.ObjectProvider<DataSourcePoolMetadataProvider> metadataProviders) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected DataSourceHealthIndicator |
createIndicator(DataSource source) |
HealthContributor |
dbHealthContributor(Map<String,DataSource> dataSources) |
createComposite
createContributor
public DataSourceHealthContributorAutoConfiguration(Map<String,DataSource> dataSources, org.springframework.beans.factory.ObjectProvider<DataSourcePoolMetadataProvider> metadataProviders)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
@Bean @ConditionalOnMissingBean(name={"dbHealthIndicator","dbHealthContributor"}) public HealthContributor dbHealthContributor(Map<String,DataSource> dataSources)
protected DataSourceHealthIndicator createIndicator(DataSource source)
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.