diff --git a/continew-webapi/src/main/resources/config/application-dev.yml b/continew-webapi/src/main/resources/config/application-dev.yml index b256c6b5..170297b2 100644 --- a/continew-webapi/src/main/resources/config/application-dev.yml +++ b/continew-webapi/src/main/resources/config/application-dev.yml @@ -11,15 +11,15 @@ server: --- ### 数据源配置 spring.datasource: type: com.zaxxer.hikari.HikariDataSource - url: jdbc:p6spy:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:continew_admin}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&autoReconnect=true&maxReconnects=10&failOverReadOnly=false + url: jdbc:p6spy:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:continew_admin}?allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&autoReconnect=true&maxReconnects=10&failOverReadOnly=false username: ${DB_USER:root} password: ${DB_PWD:123456} driver-class-name: com.p6spy.engine.spy.P6SpyDriver -# # PostgreSQL 配置 -# url: jdbc:p6spy:postgresql://${DB_HOST:127.0.0.1}:${DB_PORT:5432}/${DB_NAME:continew_admin}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&autoReconnect=true&maxReconnects=10&failOverReadOnly=false&stringtype=unspecified -# username: ${DB_USER:root} -# password: ${DB_PWD:123456} -# driver-class-name: com.p6spy.engine.spy.P6SpyDriver + # # PostgreSQL 配置 + # url: jdbc:p6spy:postgresql://${DB_HOST:127.0.0.1}:${DB_PORT:5432}/${DB_NAME:continew_admin}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&autoReconnect=true&maxReconnects=10&failOverReadOnly=false&stringtype=unspecified + # username: ${DB_USER:root} + # password: ${DB_PWD:123456} + # driver-class-name: com.p6spy.engine.spy.P6SpyDriver # Hikari 连接池配置(完整配置请参阅:https://github.com/brettwooldridge/HikariCP) hikari: # 最大连接数量(默认 10,根据实际环境调整) diff --git a/continew-webapi/src/main/resources/config/application-prod.yml b/continew-webapi/src/main/resources/config/application-prod.yml index 12095d29..a6b36ebf 100644 --- a/continew-webapi/src/main/resources/config/application-prod.yml +++ b/continew-webapi/src/main/resources/config/application-prod.yml @@ -13,16 +13,16 @@ server: --- ### 数据源配置 spring.datasource: type: com.zaxxer.hikari.HikariDataSource - url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:continew_admin}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&autoReconnect=true&maxReconnects=10&failOverReadOnly=false + url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:continew_admin}?allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&autoReconnect=true&maxReconnects=10&failOverReadOnly=false username: ${DB_USER:root} password: ${DB_PWD:123456} driver-class-name: com.mysql.cj.jdbc.Driver -# # PostgreSQL 配置 -# postgresql: -# url: jdbc:postgresql://${DB_HOST:127.0.0.1}:${DB_PORT:5432}/${DB_NAME:continew_admin}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&autoReconnect=true&maxReconnects=10&failOverReadOnly=false&stringtype=unspecified -# username: ${DB_USER:root} -# password: ${DB_PWD:123456} -# driver-class-name: org.postgresql.Driver + # # PostgreSQL 配置 + # postgresql: + # url: jdbc:postgresql://${DB_HOST:127.0.0.1}:${DB_PORT:5432}/${DB_NAME:continew_admin}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&autoReconnect=true&maxReconnects=10&failOverReadOnly=false&stringtype=unspecified + # username: ${DB_USER:root} + # password: ${DB_PWD:123456} + # driver-class-name: org.postgresql.Driver # Hikari 连接池配置(完整配置请参阅:https://github.com/brettwooldridge/HikariCP) hikari: # 最大连接数量(默认 10,根据实际环境调整)