Class DataSourceHealthContributorAutoConfiguration
java.lang.Object
org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration
- All Implemented Interfaces:
InitializingBean
@AutoConfiguration(after=DataSourceAutoConfiguration.class)
@ConditionalOnClass({org.springframework.jdbc.core.JdbcTemplate.class,org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.class})
@ConditionalOnBean(javax.sql.DataSource.class)
@ConditionalOnEnabledHealthIndicator("db")
@EnableConfigurationProperties(DataSourceHealthIndicatorProperties.class)
public class DataSourceHealthContributorAutoConfiguration
extends Object
implements InitializingBean
- Since:
- 2.0.0
- Author:
- Dave Syer, Christian Dupuis, Andy Wilkinson, Stephane Nicoll, Arthur Kalimullin, Julio Gomez, Safeer Ansari
-
Constructor Summary
ConstructorDescriptionDataSourceHealthContributorAutoConfiguration
(ObjectProvider<DataSourcePoolMetadataProvider> metadataProviders) -
Method Summary
Modifier and TypeMethodDescriptionvoid
dbHealthContributor
(Map<String, DataSource> dataSources, DataSourceHealthIndicatorProperties dataSourceHealthIndicatorProperties)
-
Constructor Details
-
DataSourceHealthContributorAutoConfiguration
public DataSourceHealthContributorAutoConfiguration(ObjectProvider<DataSourcePoolMetadataProvider> metadataProviders)
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceInitializingBean
-
dbHealthContributor
@Bean @ConditionalOnMissingBean(name={"dbHealthIndicator","dbHealthContributor"}) public HealthContributor dbHealthContributor(Map<String, DataSource> dataSources, DataSourceHealthIndicatorProperties dataSourceHealthIndicatorProperties)
-