com.yuweix.kuafu.dao.datasource.DynamicDataSource Maven / Gradle / Ivy
The newest version!
package com.yuweix.kuafu.dao.datasource;
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
/**
* @author yuwei
*/
public class DynamicDataSource extends AbstractRoutingDataSource {
@Override
protected Object determineCurrentLookupKey() {
return DataSourceContextHolder.getDataSource();
}
}