|
|
|
|
@ -46,13 +46,18 @@ spring:
|
|
|
|
|
datasource:
|
|
|
|
|
# 主库数据源
|
|
|
|
|
master:
|
|
|
|
|
# type: ${spring.datasource.type}
|
|
|
|
|
# driverClassName: com.mysql.cj.jdbc.Driver
|
|
|
|
|
# # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
|
|
|
|
# # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
|
|
|
|
# url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
|
|
|
|
# username: root
|
|
|
|
|
# password: root
|
|
|
|
|
type: ${spring.datasource.type}
|
|
|
|
|
driverClassName: com.mysql.cj.jdbc.Driver
|
|
|
|
|
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
|
|
|
|
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
|
|
|
|
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
|
|
|
|
username: root
|
|
|
|
|
password: root
|
|
|
|
|
driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
|
|
|
|
url: jdbc:sqlserver://localhost:1433;DatabaseName=energy-visual;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
|
|
|
|
|
username: SA
|
|
|
|
|
password: haiwei@123
|
|
|
|
|
# # 从库数据源
|
|
|
|
|
# slave:
|
|
|
|
|
# lazy: true
|
|
|
|
|
@ -85,13 +90,16 @@ spring:
|
|
|
|
|
# 最小空闲线程数量
|
|
|
|
|
minIdle: 10
|
|
|
|
|
# 配置获取连接等待超时的时间
|
|
|
|
|
connectionTimeout: 30000
|
|
|
|
|
# 校验超时时间
|
|
|
|
|
validationTimeout: 5000
|
|
|
|
|
# 单位:毫秒
|
|
|
|
|
# 300000ms = 300秒
|
|
|
|
|
connectionTimeout: 300000
|
|
|
|
|
# 校验超时时间,单位:毫秒
|
|
|
|
|
# 50000ms = 50秒
|
|
|
|
|
validationTimeout: 50000
|
|
|
|
|
# 空闲连接存活最大时间,默认10分钟
|
|
|
|
|
idleTimeout: 600000
|
|
|
|
|
# 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
|
|
|
|
|
maxLifetime: 1800000
|
|
|
|
|
# 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认100分钟
|
|
|
|
|
maxLifetime: 6000000
|
|
|
|
|
# 多久检查一次连接的活性
|
|
|
|
|
keepaliveTime: 30000
|
|
|
|
|
|
|
|
|
|
@ -105,7 +113,7 @@ spring.data:
|
|
|
|
|
# 数据库索引
|
|
|
|
|
database: 0
|
|
|
|
|
# redis 密码必须配置
|
|
|
|
|
password: ruoyi123
|
|
|
|
|
password: haiwei@123
|
|
|
|
|
# 连接超时时间
|
|
|
|
|
timeout: 10s
|
|
|
|
|
# 是否开启ssl
|
|
|
|
|
|