JAVA 数据库切换 -3 SqlUtils

public class SqlUtils  {    
   
    public static QueryRunnerHelper  getMySqlInstance() {
        DataSource ds = SqlMyDataSource.getInstance();
        QueryRunnerHelper  qr = new QueryRunnerHelper(ds);        
        return qr ; 
    }
    
    
    public static QueryRunnerHelper  getMsSqlInstance() {
        DataSource ds = SqlMsDataSource.getInstance();
        QueryRunnerHelper qr = new QueryRunnerHelper(ds);  
        return qr;
    }
}
原文地址:https://www.cnblogs.com/chuangjie1988/p/14899646.html