|
|
@@ -37,7 +37,7 @@ spring:
|
|
|
# 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
|
|
|
dynamic:
|
|
|
# 性能分析插件(有性能损耗 不建议生产环境使用)
|
|
|
- p6spy: true
|
|
|
+ p6spy: false
|
|
|
# 设置默认的数据源或者数据源组,默认值即为 master
|
|
|
primary: master
|
|
|
# 严格模式 匹配不到数据源则报错
|
|
|
@@ -49,9 +49,9 @@ spring:
|
|
|
driverClassName: com.mysql.cj.jdbc.Driver
|
|
|
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
|
|
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
|
|
- url: jdbc:mysql://xt.wenhq.top:8583/iotc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
|
|
- username: root
|
|
|
- password: root
|
|
|
+ url: jdbc:mysql://${DBHOST:xt.wenhq.top}:${DBPORT:8583}/iotc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
|
|
+ username: ${DBUSER:root}
|
|
|
+ password: ${DBPWD:root}
|
|
|
# 从库数据源
|
|
|
slave:
|
|
|
lazy: true
|
|
|
@@ -102,13 +102,13 @@ spring:
|
|
|
spring:
|
|
|
redis:
|
|
|
# 地址
|
|
|
- host: 60.204.209.152
|
|
|
+ host: ${REDIS_HOST:60.204.209.152}
|
|
|
# 端口,默认为6379
|
|
|
- port: 6379
|
|
|
+ port: ${REDIS_PORT:6379}
|
|
|
# 数据库索引
|
|
|
- database: 0
|
|
|
+ database: ${REDIS_DB:0}
|
|
|
# 密码(如没有密码请注释掉)
|
|
|
- password: 123456
|
|
|
+ password: ${REDIS_PWD:123456}
|
|
|
# 连接超时时间
|
|
|
timeout: 10s
|
|
|
# 是否开启ssl
|