datasource.yml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. datasource:
  2. system-master:
  3. # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
  4. # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能
  5. url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
  6. username: root
  7. password: password
  8. gen:
  9. url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
  10. username: root
  11. password: password
  12. job:
  13. url: jdbc:mysql://localhost:3306/ry-job?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
  14. username: root
  15. password: password
  16. workflow:
  17. url: jdbc:mysql://localhost:3306/ry-workflow?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
  18. username: root
  19. password: password
  20. # system-oracle:
  21. # url: jdbc:oracle:thin:@//localhost:1521/XE
  22. # username: ROOT
  23. # password: password
  24. # system-postgres:
  25. # url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
  26. # username: root
  27. # password: password
  28. spring:
  29. datasource:
  30. type: com.zaxxer.hikari.HikariDataSource
  31. # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
  32. dynamic:
  33. # 性能分析插件(有性能损耗 不建议生产环境使用)
  34. p6spy: true
  35. # 开启seata代理,开启后默认每个数据源都代理,如果某个不需要代理可单独关闭
  36. seata: ${seata.enabled}
  37. # 严格模式 匹配不到数据源则报错
  38. strict: true
  39. hikari:
  40. # 最大连接池数量
  41. maxPoolSize: 20
  42. # 最小空闲线程数量
  43. minIdle: 10
  44. # 配置获取连接等待超时的时间
  45. connectionTimeout: 30000
  46. # 校验超时时间
  47. validationTimeout: 5000
  48. # 空闲连接存活最大时间,默认10分钟
  49. idleTimeout: 600000
  50. # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
  51. maxLifetime: 1800000
  52. # 多久检查一次连接的活性
  53. keepaliveTime: 30000