@Configuration @ConditionalOnProperty(prefix="waiter.muti-datasource", name="open", havingValue="false", matchIfMissing=true) @EnableTransactionManagement @MapperScan(basePackages="waiter.modular.*.dao") public class SingleDataSourceConfig extends Object
Constructor and Description |
---|
SingleDataSourceConfig() |
Modifier and Type | Method and Description |
---|---|
DataScopeInterceptor |
dataScopeInterceptor() |
com.alibaba.druid.pool.DruidDataSource |
dataSource(DruidProperties druidProperties) |
DruidProperties |
druidProperties() |
com.baomidou.mybatisplus.plugins.OptimisticLockerInterceptor |
optimisticLockerInterceptor() |
com.baomidou.mybatisplus.plugins.PaginationInterceptor |
paginationInterceptor() |
@Bean @ConfigurationProperties(prefix="spring.datasource") public DruidProperties druidProperties()
@Bean public com.alibaba.druid.pool.DruidDataSource dataSource(DruidProperties druidProperties)
@Bean public com.baomidou.mybatisplus.plugins.PaginationInterceptor paginationInterceptor()
@Bean public DataScopeInterceptor dataScopeInterceptor()
@Bean public com.baomidou.mybatisplus.plugins.OptimisticLockerInterceptor optimisticLockerInterceptor()
Copyright © 2018. All rights reserved.