datasource.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. spring:
  17. datasource:
  18. type: com.alibaba.druid.pool.DruidDataSource
  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. druid:
  28. initial-size: 5
  29. min-idle: 5
  30. maxActive: 20
  31. maxWait: 60000
  32. timeBetweenEvictionRunsMillis: 60000
  33. minEvictableIdleTimeMillis: 300000
  34. validationQuery: SELECT 1 FROM DUAL
  35. testWhileIdle: true
  36. testOnBorrow: false
  37. testOnReturn: false
  38. poolPreparedStatements: true
  39. maxPoolPreparedStatementPerConnectionSize: 20
  40. filters: stat,slf4j
  41. connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
  42. # seata配置
  43. seata:
  44. # 关闭自动代理
  45. enable-auto-data-source-proxy: false