@Configuration
@ConditionalOnProperty(name="sqlhelper.dynamic-datasource.enabled",
havingValue="true",
matchIfMissing=false)
public class DynamicDataSourcesAutoConfiguration
extends Object
| 构造器和说明 |
|---|
DynamicDataSourcesAutoConfiguration() |
| 限定符和类型 | 方法和说明 |
|---|---|
CentralizedDataSourceFactory |
centralizedDataSourceFactory(DataSourceRegistry dataSourceRegistry) |
MethodDataSourceKeyRegistry |
dataSourceKeyRegistry(org.springframework.beans.factory.ObjectProvider<List<DataSourceKeyAnnotationParser>> dataSourceKeyAnnotationParsersProvider) |
MethodInvocationDataSourceKeySelector |
dataSourceKeySelector(DataSourceRegistry registry,
MethodDataSourceKeyRegistry keyRegistry,
org.springframework.beans.factory.ObjectProvider<List<DataSourceKeyRouter>> routersProvider,
DynamicDataSourcesProperties dataSourcesProperties) |
DataSourceRegistry |
dataSourceRegistry(org.springframework.beans.factory.ObjectProvider<DataSourceKeyDataSourceParser> dataSourceKeyParserProvider) |
org.springframework.beans.factory.config.ListFactoryBean |
dataSourcesFactoryBean(CentralizedDataSourceFactory centralizedDataSourceFactory,
DynamicDataSourcesProperties dynamicDataSourcesProperties,
org.springframework.beans.factory.ObjectProvider<DataSource> springBootOriginDataSourceProvider,
org.springframework.beans.factory.ObjectProvider<org.springframework.boot.autoconfigure.jdbc.DataSourceProperties> builtInDataSourceProperties,
org.springframework.context.ApplicationContext applicationContext) |
DynamicDataSourcesProperties |
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.dynamic-datasource") public DynamicDataSourcesProperties namedDataSourcesProperties(org.springframework.core.env.Environment environment)
@Bean(name="dataSourcesFactoryBean") public org.springframework.beans.factory.config.ListFactoryBean dataSourcesFactoryBean(CentralizedDataSourceFactory centralizedDataSourceFactory, DynamicDataSourcesProperties dynamicDataSourcesProperties, org.springframework.beans.factory.ObjectProvider<DataSource> springBootOriginDataSourceProvider, org.springframework.beans.factory.ObjectProvider<org.springframework.boot.autoconfigure.jdbc.DataSourceProperties> builtInDataSourceProperties, org.springframework.context.ApplicationContext applicationContext)
@Bean public MethodDataSourceKeyRegistry dataSourceKeyRegistry(org.springframework.beans.factory.ObjectProvider<List<DataSourceKeyAnnotationParser>> dataSourceKeyAnnotationParsersProvider)
@Bean public MethodInvocationDataSourceKeySelector dataSourceKeySelector(DataSourceRegistry registry, MethodDataSourceKeyRegistry keyRegistry, org.springframework.beans.factory.ObjectProvider<List<DataSourceKeyRouter>> routersProvider, DynamicDataSourcesProperties dataSourcesProperties)
Copyright © 2021. All rights reserved.