Commit 877e2376be8b45a2abbd8408beb8e031bcb35d3e
Committed by
Gitee
!404 修复项目启动,链接数据查询时控制台报错java.sql.SQLNonTransientConnectionException: Could not c…
…reate connection to database server. Attempt Merge pull request !404 from zhang/master
Showing
2 changed files
with
4 additions
and
4 deletions
yudao-server/src/main/resources/application-dev.yaml
| ... | ... | @@ -45,13 +45,13 @@ spring: |
| 45 | 45 | datasource: |
| 46 | 46 | master: |
| 47 | 47 | name: ruoyi-vue-pro |
| 48 | - url: jdbc:mysql://400-infra.server.iocoder.cn:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT&nullCatalogMeansCurrent=true | |
| 48 | + url: jdbc:mysql://400-infra.server.iocoder.cn:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true | |
| 49 | 49 | driver-class-name: com.mysql.jdbc.Driver |
| 50 | 50 | username: root |
| 51 | 51 | password: 3WLiVUBEwTbvAfsh |
| 52 | 52 | slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 |
| 53 | 53 | name: ruoyi-vue-pro |
| 54 | - url: jdbc:mysql://400-infra.server.iocoder.cn:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT&nullCatalogMeansCurrent=true | |
| 54 | + url: jdbc:mysql://400-infra.server.iocoder.cn:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true | |
| 55 | 55 | driver-class-name: com.mysql.jdbc.Driver |
| 56 | 56 | username: root |
| 57 | 57 | password: 3WLiVUBEwTbvAfsh | ... | ... |
yudao-server/src/main/resources/application-local.yaml
| ... | ... | @@ -45,7 +45,7 @@ spring: |
| 45 | 45 | datasource: |
| 46 | 46 | master: |
| 47 | 47 | name: ruoyi-vue-pro |
| 48 | - url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 | |
| 48 | + url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true # MySQL Connector/J 8.X 连接的示例 | |
| 49 | 49 | # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 |
| 50 | 50 | # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例 |
| 51 | 51 | # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 |
| ... | ... | @@ -56,7 +56,7 @@ spring: |
| 56 | 56 | # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W |
| 57 | 57 | slave: # 模拟从库,可根据自己需要修改 |
| 58 | 58 | name: ruoyi-vue-pro |
| 59 | - url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 | |
| 59 | + url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true # MySQL Connector/J 8.X 连接的示例 | |
| 60 | 60 | # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 |
| 61 | 61 | # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例 |
| 62 | 62 | # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 | ... | ... |