datasource.yml 2.9 KB

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