@Configuration @ComponentScan(value="org.apache.shardingsphere.spring.boot.converter") @EnableConfigurationProperties(value=SpringBootPropertiesConfiguration.class) public class ShardingSphereAutoConfiguration extends Object implements org.springframework.context.EnvironmentAware
| 构造器和说明 |
|---|
ShardingSphereAutoConfiguration() |
| 限定符和类型 | 方法和说明 |
|---|---|
DataSource |
dataSource(org.apache.shardingsphere.infra.config.mode.ModeConfiguration modeConfig)
Get data source bean from registry center.
|
org.apache.shardingsphere.infra.config.mode.ModeConfiguration |
modeConfiguration()
Get mode configuration.
|
void |
setEnvironment(org.springframework.core.env.Environment environment) |
DataSource |
shardingSphereDataSource(org.springframework.beans.factory.ObjectProvider<List<org.apache.shardingsphere.infra.config.rule.RuleConfiguration>> rules,
org.springframework.beans.factory.ObjectProvider<org.apache.shardingsphere.infra.config.mode.ModeConfiguration> modeConfig)
Get ShardingSphere data source bean.
|
TransactionTypeScanner |
transactionTypeScanner()
Create transaction type scanner.
|
@Bean public org.apache.shardingsphere.infra.config.mode.ModeConfiguration modeConfiguration()
@Bean @Conditional(value=LocalRulesCondition.class) @Autowired(required=false) public DataSource shardingSphereDataSource(org.springframework.beans.factory.ObjectProvider<List<org.apache.shardingsphere.infra.config.rule.RuleConfiguration>> rules, org.springframework.beans.factory.ObjectProvider<org.apache.shardingsphere.infra.config.mode.ModeConfiguration> modeConfig) throws SQLException
rules - rules configurationmodeConfig - mode configurationSQLException - SQL exception@Bean @ConditionalOnMissingBean(value=javax.sql.DataSource.class) public DataSource dataSource(org.apache.shardingsphere.infra.config.mode.ModeConfiguration modeConfig) throws SQLException
modeConfig - mode configurationSQLException - SQL exception@Bean public TransactionTypeScanner transactionTypeScanner()
public final void setEnvironment(org.springframework.core.env.Environment environment)
setEnvironment 在接口中 org.springframework.context.EnvironmentAwareCopyright © 2022 The Apache Software Foundation. All rights reserved.