datasource.yml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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: root
  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: root
  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: root
  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: root
  20. # 宠宝业务库(服务管理/档案管理/履约者管理)
  21. pet-system:
  22. url: jdbc:mysql://localhost:3306/pet_system?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
  23. username: root
  24. password: root
  25. # system-oracle:
  26. # url: jdbc:oracle:thin:@//localhost:1521/XE
  27. # username: ROOT
  28. # password: password
  29. # system-postgres:
  30. # url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
  31. # username: root
  32. # password: password
  33. spring:
  34. datasource:
  35. type: com.zaxxer.hikari.HikariDataSource
  36. # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
  37. dynamic:
  38. # 性能分析插件(有性能损耗 不建议生产环境使用)
  39. p6spy: true
  40. # 开启seata代理,开启后默认每个数据源都代理,如果某个不需要代理可单独关闭
  41. seata: ${seata.enabled}
  42. # 严格模式 匹配不到数据源则报错
  43. strict: true
  44. hikari:
  45. # 最大连接池数量
  46. maxPoolSize: 20
  47. # 最小空闲线程数量
  48. minIdle: 10
  49. # 配置获取连接等待超时的时间
  50. connectionTimeout: 30000
  51. # 校验超时时间
  52. validationTimeout: 5000
  53. # 空闲连接存活最大时间,默认10分钟
  54. idleTimeout: 600000
  55. # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
  56. maxLifetime: 1800000
  57. # 多久检查一次连接的活性
  58. keepaliveTime: 30000