Ver código fonte

设置连接测试超时时间

chenw 7 anos atrás
pai
commit
c3566af894

+ 1 - 0
bi-server/src/main/java/com/usoftchina/bi/server/service/dataSource/ImplementSqlService.java

@@ -135,6 +135,7 @@ public class ImplementSqlService {
         String username = databases.getUserName();
         Connection con = null;
         try {
+            DriverManager.setLoginTimeout(6);
             con = DriverManager.getConnection(url, username, password);
             con.close();
         } catch (SQLException se) {