package com.changda.gjjapp.zhfwpt.luoyu;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

import java.util.logging.Logger;

public class DynamicDataSource extends AbstractRoutingDataSource {

    /**
     * 取得当前使用那个数据源。
     */
    @Override
    protected Object determineCurrentLookupKey() {
        System.out.println(DbContextHolder.getDbType());
        return DbContextHolder.getDbType();
    }


    public Logger getParentLogger() {
        // TODO Auto-generated method stub
        return null;
    }

} 