/*


package com.base.track.config;

import com.alibaba.druid.pool.DruidDataSource;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;

import javax.sql.DataSource;


*/
/**
 * 数据库配置类
 *//*



@Configuration
@MapperScan(basePackages = {"com.base.track.mapper"}, sqlSessionTemplateRef = "sqlSessionTemplate")
public class TrackDataSourceConfig {
    @Value("${spring.shardingsphere.datasource.mydb.initialSize}")
    private Integer initialSize;

    @Value("${spring.shardingsphere.datasource.mydb.minIdle}")
    private Integer minIdle;

    @Value("${spring.shardingsphere.datasource.mydb.maxActive}")
    private Integer maxActive;

    @Value("${spring.shardingsphere.datasource.mydb.maxWait}")
    private Integer maxWait;


    @Bean(name = {"dataSource"})
    @ConfigurationProperties(prefix = "spring.shardingsphere.datasource.mydb")
    @Primary
    public DataSource dataSource() {
        DruidDataSource datasource = new DruidDataSource();
        datasource.setInitialSize(this.initialSize);
        datasource.setMinIdle(this.minIdle);
        datasource.setMaxActive(this.maxActive);
        datasource.setMaxWait(this.maxWait);
        return datasource;
    }


    @Bean(name = {"transactionManager"})
    public DataSourceTransactionManager transactionManager(@Qualifier("dataSource") DataSource dataSource) {
        return new DataSourceTransactionManager(dataSource);
    }

    @Bean(name = {"sqlSessionTemplate"})
    public SqlSessionTemplate sqlSessionTemplate(@Qualifier("sqlSessionFactory") SqlSessionFactory sqlSessionFactory) throws Exception {
        return new SqlSessionTemplate(sqlSessionFactory);
    }
}
*/
