Browse Source

修改数据库连接池最大连接数 maximumPoolSize 为60

andy 1 year ago
parent
commit
796b6d738d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/main/java/com/scbfkj/uni/process/DataBase.java

+ 2 - 1
src/main/java/com/scbfkj/uni/process/DataBase.java

@@ -300,6 +300,7 @@ public class DataBase {
         JsonNode password = jsonNode.get("password");
         JsonNode driverClassName = jsonNode.get("driverClassName");
         HikariPool dataSourcePool = createDataSourcePool(jdbcUrl.asText(), Objects.isNull(username) ? null : username.asText(), Objects.isNull(password) ? null : password.asText(), Objects.isNull(driverClassName) ? null : driverClassName.asText(), connectionStr);
+
         dataSourcePools.put(connectionStr, dataSourcePool);
         return dataSourcePool;
     }
@@ -320,7 +321,7 @@ public class DataBase {
         hikariConfig.addDataSourceProperty("cacheServerConfiguration", "true");
         hikariConfig.addDataSourceProperty("elideSetAutoCommits", "true");
         hikariConfig.addDataSourceProperty("maintainTimeStats", "false");
-
+        hikariConfig.addDataSourceProperty("maximumPoolSize", "60");
         hikariConfig.setJdbcUrl(url);
 
         if (Objects.nonNull(username)) {