application-prod.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. spring:
  2. datasource:
  3. druid:
  4. driver-class-name: com.mysql.cj.jdbc.Driver
  5. url: jdbc:mysql://localhost:3306/yezhu?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
  6. username: root
  7. password: 5253546t..B
  8. initial-size: 10
  9. max-active: 100
  10. min-idle: 10
  11. max-wait: 60000
  12. pool-prepared-statements: true
  13. max-pool-prepared-statement-per-connection-size: 20
  14. time-between-eviction-runs-millis: 60000
  15. min-evictable-idle-time-millis: 300000
  16. #Oracle需要打开注释
  17. #validation-query: SELECT 1 FROM DUAL
  18. test-while-idle: true
  19. test-on-borrow: false
  20. test-on-return: false
  21. stat-view-servlet:
  22. enabled: true
  23. url-pattern: /druid/*
  24. #login-username: admin
  25. #login-password: admin
  26. filter:
  27. stat:
  28. log-slow-sql: true
  29. slow-sql-millis: 1000
  30. merge-sql: false
  31. wall:
  32. config:
  33. multi-statement-allow: true
  34. data:
  35. redis:
  36. database: 1
  37. host: localhost
  38. port: 6379
  39. password: 5253546t # 密码(默认为空)
  40. timeout: 6000ms # 连接超时时长(毫秒)
  41. lettuce:
  42. pool:
  43. max-active: 1000 # 连接池最大连接数(使用负值表示没有限制)
  44. max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)
  45. max-idle: 10 # 连接池中的最大空闲连接
  46. min-idle: 5 # 连接池中的最小空闲连接