application-dev.yml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # 数据源配置
  2. spring:
  3. jackson:
  4. time-zone: GMT+8 #如果有时区问题,设置时区
  5. # redis 配置
  6. redis:
  7. # 地址
  8. host: 10.0.0.8
  9. # 端口,默认为6379
  10. port: 6379
  11. # 密码
  12. password: Ylrz_1q2w3e4r5t6y
  13. # 连接超时时间
  14. timeout: 10s
  15. lettuce:
  16. pool:
  17. # 连接池中的最小空闲连接
  18. min-idle: 0
  19. # 连接池中的最大空闲连接
  20. max-idle: 8
  21. # 连接池的最大数据库连接数
  22. max-active: 8
  23. # #连接池最大阻塞等待时间(使用负值表示没有限制)
  24. max-wait: -1ms
  25. database: 1
  26. datasource:
  27. type: com.alibaba.druid.pool.DruidDataSource
  28. driverClassName: com.mysql.cj.jdbc.Driver
  29. druid:
  30. # 主库数据源
  31. master:
  32. url: jdbc:mysql://10.0.0.6:3306/fs_ffhx_shop?allowMultiQueries=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  33. username: root
  34. password: Ylrz_1q2w3e4r5t6y
  35. # 从库数据源
  36. slave:
  37. # 从数据源开关/默认关闭
  38. url: jdbc:mysql://10.0.0.3:3306/fs_ffhx_shop?allowMultiQueries=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  39. username: root
  40. password: Ylrz_1q2w3e4r5t6y
  41. # 初始连接数
  42. initialSize: 5
  43. # 最小连接池数量
  44. minIdle: 10
  45. # 最大连接池数量
  46. maxActive: 20
  47. # 配置获取连接等待超时的时间
  48. maxWait: 60000
  49. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  50. timeBetweenEvictionRunsMillis: 60000
  51. # 配置一个连接在池中最小生存的时间,单位是毫秒
  52. minEvictableIdleTimeMillis: 300000
  53. # 配置一个连接在池中最大生存的时间,单位是毫秒
  54. maxEvictableIdleTimeMillis: 900000
  55. # 配置检测连接是否有效
  56. validationQuery: SELECT 1 FROM DUAL
  57. testWhileIdle: true
  58. testOnBorrow: false
  59. testOnReturn: false
  60. webStatFilter:
  61. enabled: true
  62. statViewServlet:
  63. enabled: true
  64. # 设置白名单,不填则允许所有访问
  65. allow:
  66. url-pattern: /druid/*
  67. # 控制台管理用户名和密码
  68. login-username:
  69. login-password:
  70. filter:
  71. stat:
  72. enabled: true
  73. # 慢SQL记录
  74. log-slow-sql: true
  75. slow-sql-millis: 1000
  76. merge-sql: true
  77. wall:
  78. config:
  79. multi-statement-allow: true