@Configuration @ConditionalOnClass(value=org.springframework.jdbc.core.JdbcTemplate.class) @ConditionalOnBean(value=javax.sql.DataSource.class) @ConditionalOnEnabledHealthIndicator(value="db") public static class HealthIndicatorAutoConfiguration.DataSourcesHealthIndicatorConfiguration extends CompositeHealthIndicatorConfiguration<DataSourceHealthIndicator,DataSource> implements InitializingBean
Constructor and Description |
---|
DataSourcesHealthIndicatorConfiguration(ObjectProvider<Map<String,DataSource>> dataSourcesProvider,
ObjectProvider<Collection<DataSourcePoolMetadataProvider>> metadataProvidersProvider) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected DataSourceHealthIndicator |
createHealthIndicator(DataSource source) |
HealthIndicator |
dbHealthIndicator() |
createHealthIndicator
public DataSourcesHealthIndicatorConfiguration(ObjectProvider<Map<String,DataSource>> dataSourcesProvider, ObjectProvider<Collection<DataSourcePoolMetadataProvider>> metadataProvidersProvider)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
@Bean @ConditionalOnMissingBean(name="dbHealthIndicator") public HealthIndicator dbHealthIndicator()
protected DataSourceHealthIndicator createHealthIndicator(DataSource source)
createHealthIndicator
in class CompositeHealthIndicatorConfiguration<DataSourceHealthIndicator,DataSource>
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.