From 0f510c10db21feeaf7cd3ace62bd0edab20997f2 Mon Sep 17 00:00:00 2001 From: Shikong <919411476@qq.com> Date: Sun, 23 Jul 2023 18:03:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=20druid=20=E9=A9=B1=E5=8A=A8?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../orm/src/main/resources/application.yaml | 7 +++++++ .../starter/src/main/resources/application.yaml | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) 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: