datasource.yml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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
  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
  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
  14. username: root
  15. password: password
  16. # system-oracle:
  17. # url: jdbc:oracle:thin:@//localhost:1521/XE
  18. # username: ROOT
  19. # password: password
  20. # system-postgres:
  21. # url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
  22. # username: root
  23. # password: password
  24. spring:
  25. datasource:
  26. type: com.zaxxer.hikari.HikariDataSource
  27. # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
  28. dynamic:
  29. # 性能分析插件(有性能损耗 不建议生产环境使用)
  30. p6spy: true
  31. # 开启seata代理,开启后默认每个数据源都代理,如果某个不需要代理可单独关闭
  32. seata: true
  33. # 严格模式 匹配不到数据源则报错
  34. strict: true
  35. hikari:
  36. # 最大连接池数量
  37. maxPoolSize: 20
  38. # 最小空闲线程数量
  39. minIdle: 10
  40. # 配置获取连接等待超时的时间
  41. connectionTimeout: 30000
  42. # 校验超时时间
  43. validationTimeout: 5000
  44. # 空闲连接存活最大时间,默认10分钟
  45. idleTimeout: 600000
  46. # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
  47. maxLifetime: 1800000
  48. # 连接测试query(配置检测连接是否有效)
  49. connectionTestQuery: SELECT 1
  50. # 多久检查一次连接的活性
  51. keepaliveTime: 30000
  52. # seata配置
  53. seata:
  54. # 关闭自动代理
  55. enable-auto-data-source-proxy: false