datasource.yml 2.1 KB

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