diff --git a/backend/java/sk-matrix-service/orm/src/main/resources/application.yaml b/backend/java/sk-matrix-service/orm/src/main/resources/application.yaml index b212c69..7908ade 100644 --- a/backend/java/sk-matrix-service/orm/src/main/resources/application.yaml +++ b/backend/java/sk-matrix-service/orm/src/main/resources/application.yaml @@ -19,6 +19,13 @@ spring: password: 12341234 url: jdbc:mysql://10.10.10.200:3306/matrix_v2?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # jdbc-url: jdbc:mysql://10.10.10.100:3306/matrix?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai + initial-size: 5 + min-idle: 5 + maxWait: 60000 + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + validationQuery: SELECT 1 rules: sharding: diff --git a/backend/java/sk-matrix-service/starter/src/main/resources/application.yaml b/backend/java/sk-matrix-service/starter/src/main/resources/application.yaml index 9dc33e2..cb0779a 100644 --- a/backend/java/sk-matrix-service/starter/src/main/resources/application.yaml +++ b/backend/java/sk-matrix-service/starter/src/main/resources/application.yaml @@ -37,12 +37,20 @@ spring: datasource: names: ds ds: - # type: com.zaxxer.hikari.HikariDataSource +# type: com.zaxxer.hikari.HikariDataSource type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver username: root password: 12341234 url: jdbc:mysql://10.10.10.200:3306/matrix_v2?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true + initial-size: 5 + min-idle: 5 + maxWait: 60000 + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + validationQuery: SELECT 1 + # jdbc-url: jdbc:mysql://10.10.10.100:3306/matrix?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai rules: