application-hm.yml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # 数据源配置
  2. spring:
  3. # redis 配置
  4. redis:
  5. # 地址
  6. host: 192.168.0.100
  7. # 端口,默认为6379
  8. port: 6379
  9. # 数据库索引
  10. database: 1
  11. # 密码
  12. password:
  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: 3s
  25. datasource:
  26. type: com.alibaba.druid.pool.DruidDataSource
  27. driverClassName: com.mysql.cj.jdbc.Driver
  28. druid:
  29. # 主库数据源
  30. master:
  31. url: jdbc:mysql://192.168.0.100:13306/hs_cps?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  32. username: root
  33. password: ct!QAZ
  34. # 从库数据源
  35. slave:
  36. # 从数据源开关/默认关闭
  37. enabled: false
  38. url:
  39. username:
  40. password:
  41. # 初始连接数
  42. initialSize: 5
  43. # 最小连接池数量
  44. minIdle: 10
  45. # 最大连接池数量
  46. maxActive: 20
  47. # 配置获取连接等待超时的时间
  48. maxWait: 60000
  49. # 配置连接超时时间
  50. connectTimeout: 30000
  51. # 配置网络超时时间
  52. socketTimeout: 60000
  53. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  54. timeBetweenEvictionRunsMillis: 60000
  55. # 配置一个连接在池中最小生存的时间,单位是毫秒
  56. minEvictableIdleTimeMillis: 300000
  57. # 配置一个连接在池中最大生存的时间,单位是毫秒
  58. maxEvictableIdleTimeMillis: 900000
  59. # 配置检测连接是否有效
  60. validationQuery: SELECT 1 FROM DUAL
  61. testWhileIdle: true
  62. testOnBorrow: false
  63. testOnReturn: false
  64. webStatFilter:
  65. enabled: true
  66. statViewServlet:
  67. enabled: true
  68. # 设置白名单,不填则允许所有访问
  69. allow:
  70. url-pattern: /druid/*
  71. # 控制台管理用户名和密码
  72. login-username: ruoyi
  73. login-password: 123456
  74. filter:
  75. stat:
  76. enabled: true
  77. # 慢SQL记录
  78. log-slow-sql: true
  79. slow-sql-millis: 1000
  80. merge-sql: true
  81. wall:
  82. config:
  83. multi-statement-allow: true
  84. wechat:
  85. appid: wxf385eefdd03327fd
  86. app-secret: 7bca97ad298a17539c7c75a5bf337063
  87. app:
  88. cfg:
  89. role-top-dept-id: 201