@ConditionalOnProperty(name="sqlhelper.dynamicDataSource.enabled",
havingValue="true",
matchIfMissing=false)
@Configuration
public class DynamicDataSourcesAutoConfiguration
extends Object
| 构造器和说明 |
|---|
DynamicDataSourcesAutoConfiguration() |
| 限定符和类型 | 方法和说明 |
|---|---|
CentralizedDataSourceFactory |
centralizedDataSourceFactory(DataSourceRegistry dataSourceRegistry) |
MethodDataSourceKeyRegistry |
dataSourceKeyRegistry(org.springframework.beans.factory.ObjectProvider<List<DataSourceKeyAnnotationParser>> dataSourceKeyAnnotationParsersProvider) |
DataSourceKeySelector |
dataSourceKeySelector(DataSourceRegistry registry,
MethodDataSourceKeyRegistry keyRegistry,
org.springframework.beans.factory.ObjectProvider<List<DataSourceKeyRouter>> routersProvider,
DataSourcesProperties dataSourcesProperties) |
DataSourceRegistry |
dataSourceRegistry(org.springframework.beans.factory.ObjectProvider<DataSourceKeyDataSourceParser> dataSourceKeyParserProvider) |
org.springframework.beans.factory.config.ListFactoryBean |
dataSourcesFactoryBean(CentralizedDataSourceFactory centralizedDataSourceFactory,
DataSourcesProperties namedDataSourcesProperties,
org.springframework.beans.factory.ObjectProvider<DataSource> springBootOriginDataSourceProvider) |
DataSourcesProperties |
namedDataSourcesProperties(org.springframework.core.env.Environment environment) |
@Bean public DataSourceRegistry dataSourceRegistry(org.springframework.beans.factory.ObjectProvider<DataSourceKeyDataSourceParser> dataSourceKeyParserProvider)
@Bean public CentralizedDataSourceFactory centralizedDataSourceFactory(DataSourceRegistry dataSourceRegistry)
@Bean @ConfigurationProperties(prefix="sqlhelper.dynamicDataSource") public DataSourcesProperties namedDataSourcesProperties(org.springframework.core.env.Environment environment)
@Bean(name="dataSourcesFactoryBean") public org.springframework.beans.factory.config.ListFactoryBean dataSourcesFactoryBean(CentralizedDataSourceFactory centralizedDataSourceFactory, DataSourcesProperties namedDataSourcesProperties, org.springframework.beans.factory.ObjectProvider<DataSource> springBootOriginDataSourceProvider)
@Bean public MethodDataSourceKeyRegistry dataSourceKeyRegistry(org.springframework.beans.factory.ObjectProvider<List<DataSourceKeyAnnotationParser>> dataSourceKeyAnnotationParsersProvider)
@Bean public DataSourceKeySelector dataSourceKeySelector(DataSourceRegistry registry, MethodDataSourceKeyRegistry keyRegistry, org.springframework.beans.factory.ObjectProvider<List<DataSourceKeyRouter>> routersProvider, DataSourcesProperties dataSourcesProperties)
Copyright © 2020. All rights reserved.