puzhibing
3 天以前 ba6b508a44cb1f0730c6a27a5d73b8d2ae8f1d4b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package com.supersavedriving.driver.core.mutidatasource;
 
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
 
/**
 * 动态数据源
 *
 * @author fengshuonan
 * @date 2017年3月5日 上午9:11:49
 */
public class DynamicDataSource extends AbstractRoutingDataSource {
 
    @Override
    protected Object determineCurrentLookupKey() {
        return DataSourceContextHolder.getDataSourceType();
    }
 
}