Commit 3fb87e23 authored by Quxl's avatar Quxl

x

parent 4408f7db
...@@ -39,7 +39,7 @@ public class SqlTestController { ...@@ -39,7 +39,7 @@ public class SqlTestController {
new Thread() { new Thread() {
public void run() { public void run() {
try { try {
Thread.sleep(10000L); Thread.sleep(60000L);
if(!dataSource.isClosed()) { if(!dataSource.isClosed()) {
dataSource.close(); dataSource.close();
} }
...@@ -59,6 +59,7 @@ public class SqlTestController { ...@@ -59,6 +59,7 @@ public class SqlTestController {
} else { } else {
throw new XRException("URL无法识别, 没有对应的驱动程序"); throw new XRException("URL无法识别, 没有对应的驱动程序");
} }
dataSource.setQueryTimeout(60);
dataSource.setUsername(username); dataSource.setUsername(username);
dataSource.setPassword(password); dataSource.setPassword(password);
dataSource.setUrl(jdbcUrl); dataSource.setUrl(jdbcUrl);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment