application-dev.yml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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: fhhxadmin
  34. password: fhhx_1q0p2w9o3e8i
  35. # 初始连接数
  36. initialSize: 100
  37. # 最小连接池数量
  38. minIdle: 100
  39. # 最大连接池数量
  40. maxActive: 400
  41. # 配置获取连接等待超时的时间
  42. maxWait: 60000
  43. # 从库数据源
  44. slave:
  45. enabled: true
  46. # 从数据源开关/默认关闭
  47. url: jdbc:mysql://10.0.0.3:3306/fs_ffhx_shop?allowMultiQueries=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  48. username: fhhxadmin
  49. password: fhhx_1q0p2w9o3e8i
  50. # 初始连接数
  51. initialSize: 100
  52. # 最小连接池数量
  53. minIdle: 100
  54. # 最大连接池数量
  55. maxActive: 400
  56. # 配置获取连接等待超时的时间
  57. maxWait: 60000
  58. # 初始连接数
  59. initialSize: 500
  60. # 最小连接池数量
  61. minIdle: 500
  62. # 最大连接池数量
  63. maxActive: 2000
  64. # 配置获取连接等待超时的时间
  65. maxWait: 60000
  66. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  67. timeBetweenEvictionRunsMillis: 60000
  68. # 配置一个连接在池中最小生存的时间,单位是毫秒
  69. minEvictableIdleTimeMillis: 300000
  70. # 配置一个连接在池中最大生存的时间,单位是毫秒
  71. maxEvictableIdleTimeMillis: 900000
  72. # 配置检测连接是否有效
  73. validationQuery: SELECT 1 FROM DUAL
  74. testWhileIdle: true
  75. testOnBorrow: false
  76. testOnReturn: false
  77. webStatFilter:
  78. enabled: true
  79. statViewServlet:
  80. enabled: true
  81. # 设置白名单,不填则允许所有访问
  82. allow:
  83. url-pattern: /druid/*
  84. # 控制台管理用户名和密码
  85. login-username:
  86. login-password:
  87. filter:
  88. stat:
  89. enabled: true
  90. # 慢SQL记录
  91. log-slow-sql: true
  92. slow-sql-millis: 1000
  93. merge-sql: true
  94. wall:
  95. config:
  96. multi-statement-allow: true
  97. rocketmq:
  98. name-server: rmq-16b45v4p9n.rocketmq.cd.qcloud.tencenttdmq.com:8080 # RocketMQ NameServer 地址
  99. producer:
  100. group: my-producer-group
  101. access-key: ak16b45v4p9n150d89395b3c # 替换为实际的 accessKey
  102. secret-key: sk370fb48d869b152b # 替换为实际的 secretKey
  103. consumer:
  104. group: common-group
  105. access-key: ak16b45v4p9n150d89395b3c # 替换为实际的 accessKey
  106. secret-key: sk370fb48d869b152b # 替换为实际的 secretKey