调整连接池中锁定链接

Class.forName(StatisticConstant.Mysql);
DriverManager.setLoginTimeout(1);

Driver driver = DriverManager.getDriver(dataSourceDaMeng.buildURL());
java.util.Properties info = new java.util.Properties();
info.put("user", dataSourceDaMeng.getUsername());
info.put("password", dataSourceDaMeng.getPassword());
Connection connection = driver.connect(dataSourceDaMeng.buildURL(), info);
return connection;
posted @ 2019-07-03 09:37  青竹玉简  阅读(292)  评论(0编辑  收藏  举报