datasource.yml 1.9 KB

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