@Configuration @ConditionalOnClass(value={javax.sql.DataSource.class,org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType.class}) @EnableConfigurationProperties(value=DataSourceProperties.class) @Import(value={org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerPostProcessor.Registrar.class,DataSourcePoolMetadataProvidersConfiguration.class}) public class DataSourceAutoConfiguration extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
DataSourceAutoConfiguration.EmbeddedDatabaseConfiguration |
protected static class |
DataSourceAutoConfiguration.PooledDataSourceConfiguration |
protected static class |
DataSourceAutoConfiguration.TomcatDataSourceJmxConfiguration |
Constructor and Description |
---|
DataSourceAutoConfiguration() |
Modifier and Type | Method and Description |
---|---|
static boolean |
containsAutoConfiguredDataSource(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
Determines if the
dataSource being used by Spring was created from
EmbeddedDataSourceConfiguration . |
org.springframework.boot.autoconfigure.jdbc.DataSourceInitializer |
dataSourceInitializer(DataSourceProperties properties,
org.springframework.context.ApplicationContext applicationContext) |
@Bean @ConditionalOnMissingBean public org.springframework.boot.autoconfigure.jdbc.DataSourceInitializer dataSourceInitializer(DataSourceProperties properties, org.springframework.context.ApplicationContext applicationContext)
public static boolean containsAutoConfiguredDataSource(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
dataSource
being used by Spring was created from
EmbeddedDataSourceConfiguration
.beanFactory
- the bean factoryCopyright © 2018 Pivotal Software, Inc.. All rights reserved.