package cn.datasource;

import org.springframework.core.annotation.Order;
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
@Order(2)
public class DynamicDataSource    extends AbstractRoutingDataSource {
    @Override
    protected Object determineCurrentLookupKey() {
        return  DatabaseContextHolder.getDB();
    }
}
