application-druid.yml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # 数据源配置
  2. spring:
  3. data:
  4. # redis 配置
  5. redis:
  6. # 地址
  7. host: 192.168.0.101
  8. # 端口,默认为6379
  9. port: 6379
  10. # 数据库索引
  11. database: 8
  12. # 密码
  13. password: weibaojinwang
  14. # 连接超时时间
  15. timeout: 10s
  16. lettuce:
  17. pool:
  18. # 连接池中的最小空闲连接
  19. min-idle: 0
  20. # 连接池中的最大空闲连接
  21. max-idle: 8
  22. # 连接池的最大数据库连接数
  23. max-active: 8
  24. # #连接池最大阻塞等待时间(使用负值表示没有限制)
  25. max-wait: -1ms
  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://192.168.0.100:3306/cpyypt-tsb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  33. username: wbjw
  34. password: l1M9kX7S3z4RzcWW
  35. # 从库数据源
  36. slave:
  37. # 从数据源开关/默认关闭
  38. enabled: false
  39. url:
  40. username:
  41. password:
  42. # 初始连接数
  43. initialSize: 5
  44. # 最小连接池数量
  45. minIdle: 10
  46. # 最大连接池数量
  47. maxActive: 20
  48. # 配置获取连接等待超时的时间
  49. maxWait: 60000
  50. # 配置连接超时时间
  51. connectTimeout: 30000
  52. # 配置网络超时时间
  53. socketTimeout: 60000
  54. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  55. timeBetweenEvictionRunsMillis: 60000
  56. # 配置一个连接在池中最小生存的时间,单位是毫秒
  57. minEvictableIdleTimeMillis: 300000
  58. # 配置一个连接在池中最大生存的时间,单位是毫秒
  59. maxEvictableIdleTimeMillis: 900000
  60. # 配置检测连接是否有效
  61. validationQuery: SELECT 1 FROM DUAL
  62. testWhileIdle: true
  63. testOnBorrow: false
  64. testOnReturn: false
  65. webStatFilter:
  66. enabled: true
  67. statViewServlet:
  68. enabled: true
  69. # 设置白名单,不填则允许所有访问
  70. allow:
  71. url-pattern: /druid/*
  72. # 控制台管理用户名和密码
  73. login-username: ruoyi
  74. login-password: 123456
  75. filter:
  76. stat:
  77. enabled: true
  78. # 慢SQL记录
  79. log-slow-sql: true
  80. slow-sql-millis: 1000
  81. merge-sql: true
  82. wall:
  83. config:
  84. multi-statement-allow: true
  85. emqx:
  86. broker: tcp://192.168.0.101:9000
  87. userName: admin
  88. password: houjianwei
  89. cleanSession: true
  90. reconnect: true
  91. timeout: 20
  92. keepAlive: 10
  93. apiUserName: admin
  94. apiPassword: public
  95. apiPath: http://192.168.0.101:8081
  96. messageRouters:
  97. - topic: $share/wbjw/cpyypt/up/#
  98. qos: 2
  99. listener: deviceMessageListener
  100. - topic: $share/wbjw/invent/up/#
  101. qos: 2
  102. listener: inventMessageListener
  103. - topic: $SYS/brokers/+/clients/+/disconnected
  104. qos: 2
  105. listener: clientLineStatusListener
  106. - topic: $share/wbjw/cpyypt/logup/#
  107. qos: 2
  108. listener: deviceLogListener