类 SpringMultiTenantConfiguration
- java.lang.Object
-
- y9.autoconfiguration.tenant.SpringMultiTenantConfiguration
-
@Configuration @AutoConfigureBefore(com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure.class) @EnableConfigurationProperties(org.springframework.boot.autoconfigure.orm.jpa.JpaProperties.class) @EnableTransactionManagement(proxyTargetClass=true, mode=ASPECTJ) @Y9EnableJpaRepositories(basePackages="${y9.feature.jpa.packagesToScanRepositoryTenant}", includeFilters=, entityManagerFactoryRef="rsTenantEntityManagerFactory", transactionManagerRef="rsTenantTransactionManager") public class SpringMultiTenantConfiguration extends Object
-
-
构造器概要
构造器 构造器 说明 SpringMultiTenantConfiguration()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 com.alibaba.druid.pool.DruidDataSourcedefaultDataSource(org.springframework.core.env.Environment environment)org.springframework.jdbc.core.JdbcTemplatejdbcTemplate4Public(com.alibaba.druid.pool.DruidDataSource y9PublicDS)org.springframework.jdbc.core.JdbcTemplatejdbcTemplate4Tenant(DataSource ds)org.springframework.orm.jpa.JpaVendorAdapterjpaVendorAdapter()org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBeanrsTenantEntityManagerFactory(DataSource ds, org.springframework.boot.autoconfigure.orm.jpa.JpaProperties jpaProperties, org.springframework.core.env.Environment environment)org.springframework.transaction.PlatformTransactionManagerrsTenantTransactionManager(javax.persistence.EntityManagerFactory emf)Y9Contexty9Context()com.alibaba.druid.pool.DruidDataSourcey9PublicDS()DataSourcey9TenantDataSource(com.alibaba.druid.pool.DruidDataSource defaultDataSource, Y9TenantDataSourceLookup y9TenantDataSourceLookup)Y9TenantDataSourceLookupy9TenantDataSourceLookup(com.alibaba.druid.pool.DruidDataSource ds, org.springframework.core.env.Environment environment)
-
-
-
方法详细资料
-
defaultDataSource
@Bean("defaultDataSource") @ConditionalOnMissingBean(name="defaultDataSource") public com.alibaba.druid.pool.DruidDataSource defaultDataSource(org.springframework.core.env.Environment environment)
-
jdbcTemplate4Tenant
@Bean("jdbcTemplate4Tenant") @ConditionalOnMissingBean(name="jdbcTemplate4Tenant") public org.springframework.jdbc.core.JdbcTemplate jdbcTemplate4Tenant(@Qualifier("y9TenantDataSource") DataSource ds)
-
jpaVendorAdapter
@Bean @ConditionalOnMissingBean public org.springframework.orm.jpa.JpaVendorAdapter jpaVendorAdapter()
-
rsTenantEntityManagerFactory
@Primary @Bean({"rsTenantEntityManagerFactory","entityManagerFactory"}) public org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean rsTenantEntityManagerFactory(@Qualifier("y9TenantDataSource") DataSource ds, org.springframework.boot.autoconfigure.orm.jpa.JpaProperties jpaProperties, org.springframework.core.env.Environment environment)
-
rsTenantTransactionManager
@Primary @Bean({"rsTenantTransactionManager","transactionManager"}) public org.springframework.transaction.PlatformTransactionManager rsTenantTransactionManager(@Qualifier("rsTenantEntityManagerFactory") javax.persistence.EntityManagerFactory emf)
-
y9Context
@Bean @ConditionalOnMissingBean(net.risesoft.y9.Y9Context.class) public Y9Context y9Context()
-
y9PublicDS
@ConfigurationProperties("spring.datasource.druid.y9-public") @Bean(name="y9PublicDS") @ConditionalOnMissingBean(name="y9PublicDS") public com.alibaba.druid.pool.DruidDataSource y9PublicDS()
-
jdbcTemplate4Public
@Bean(name="jdbcTemplate4Public") @ConditionalOnMissingBean(name="jdbcTemplate4Public") public org.springframework.jdbc.core.JdbcTemplate jdbcTemplate4Public(@Qualifier("y9PublicDS") com.alibaba.druid.pool.DruidDataSource y9PublicDS)
-
y9TenantDataSource
@Primary @Bean("y9TenantDataSource") @ConditionalOnMissingBean(name="y9TenantDataSource") public DataSource y9TenantDataSource(@Qualifier("defaultDataSource") com.alibaba.druid.pool.DruidDataSource defaultDataSource, @Qualifier("y9TenantDataSourceLookup") Y9TenantDataSourceLookup y9TenantDataSourceLookup)
-
y9TenantDataSourceLookup
@Bean("y9TenantDataSourceLookup") public Y9TenantDataSourceLookup y9TenantDataSourceLookup(@Qualifier("y9PublicDS") com.alibaba.druid.pool.DruidDataSource ds, org.springframework.core.env.Environment environment)
-
-