72 lines
3.5 KiB
YAML
72 lines
3.5 KiB
YAML
datasource:
|
||
system-master:
|
||
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能
|
||
url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
|
||
username: root
|
||
password: password
|
||
gen:
|
||
url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
|
||
username: root
|
||
password: password
|
||
job:
|
||
url: jdbc:mysql://localhost:3306/ry-job?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
|
||
username: root
|
||
password: password
|
||
workflow:
|
||
url: jdbc:mysql://localhost:3306/ry-workflow?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||
username: root
|
||
password: password
|
||
# system-oracle:
|
||
# url: jdbc:oracle:thin:@//localhost:1521/XE
|
||
# username: ROOT
|
||
# password: password
|
||
# system-postgres:
|
||
# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
|
||
# username: root
|
||
# password: password
|
||
|
||
spring:
|
||
datasource:
|
||
type: com.alibaba.druid.pool.DruidDataSource
|
||
# 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
|
||
dynamic:
|
||
# 性能分析插件(有性能损耗 不建议生产环境使用)
|
||
p6spy: true
|
||
# 开启seata代理,开启后默认每个数据源都代理,如果某个不需要代理可单独关闭
|
||
seata: ${seata.enabled}
|
||
# 严格模式 匹配不到数据源则报错
|
||
strict: true
|
||
# Druid数据源配置
|
||
druid:
|
||
# 初始化连接数
|
||
initialSize: 5
|
||
# 最小空闲连接数
|
||
minIdle: 10
|
||
# 最大连接数
|
||
maxActive: 20
|
||
# 获取连接等待超时的时间
|
||
maxWait: 60000
|
||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||
timeBetweenEvictionRunsMillis: 60000
|
||
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||
minEvictableIdleTimeMillis: 300000
|
||
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
||
maxEvictableIdleTimeMillis: 900000
|
||
# 配置检测连接是否有效
|
||
validationQuery: SELECT 1
|
||
# 申请连接时执行validationQuery检测连接是否有效
|
||
testWhileIdle: true
|
||
# 申请连接时执行validationQuery检测连接是否有效
|
||
testOnBorrow: false
|
||
# 归还连接时执行validationQuery检测连接是否有效
|
||
testOnReturn: false
|
||
# 是否缓存preparedStatement,也就是PSCache
|
||
poolPreparedStatements: true
|
||
# 配置监控统计拦截的filters
|
||
filters: stat,wall,slf4j
|
||
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
|
||
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
|
||
# 合并多个DruidDataSource的监控数据
|
||
useGlobalDataSourceStat: true
|