调整 druid 驱动参数

This commit is contained in:
Shikong 2023-07-23 18:03:51 +08:00
parent 7983aa26f9
commit 0f510c10db
2 changed files with 16 additions and 1 deletions

View File

@ -19,6 +19,13 @@ spring:
password: 12341234 password: 12341234
url: jdbc:mysql://10.10.10.200:3306/matrix_v2?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai 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 # 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: rules:
sharding: sharding:

View File

@ -37,12 +37,20 @@ spring:
datasource: datasource:
names: ds names: ds
ds: ds:
# type: com.zaxxer.hikari.HikariDataSource # type: com.zaxxer.hikari.HikariDataSource
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
username: root username: root
password: 12341234 password: 12341234
url: jdbc:mysql://10.10.10.200:3306/matrix_v2?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true 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 # jdbc-url: jdbc:mysql://10.10.10.100:3306/matrix?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
rules: rules: