application-druid.yml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # 数据源配置
  2. spring:
  3. datasource:
  4. type: com.alibaba.druid.pool.DruidDataSource
  5. driverClassName: com.mysql.cj.jdbc.Driver
  6. druid:
  7. # 主库数据源
  8. master:
  9. url: jdbc:mysql://192.168.0.100:3306/cpyypt-tsb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  10. username: wbjw
  11. password: l1M9kX7S3z4RzcWW
  12. # 从库数据源
  13. slave:
  14. # 从数据源开关/默认关闭
  15. enabled: false
  16. url:
  17. username:
  18. password:
  19. # 初始连接数
  20. initialSize: 5
  21. # 最小连接池数量
  22. minIdle: 10
  23. # 最大连接池数量
  24. maxActive: 20
  25. # 配置获取连接等待超时的时间
  26. maxWait: 60000
  27. # 配置连接超时时间
  28. connectTimeout: 30000
  29. # 配置网络超时时间
  30. socketTimeout: 60000
  31. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  32. timeBetweenEvictionRunsMillis: 60000
  33. # 配置一个连接在池中最小生存的时间,单位是毫秒
  34. minEvictableIdleTimeMillis: 300000
  35. # 配置一个连接在池中最大生存的时间,单位是毫秒
  36. maxEvictableIdleTimeMillis: 900000
  37. # 配置检测连接是否有效
  38. validationQuery: SELECT 1 FROM DUAL
  39. testWhileIdle: true
  40. testOnBorrow: false
  41. testOnReturn: false
  42. webStatFilter:
  43. enabled: true
  44. statViewServlet:
  45. enabled: true
  46. # 设置白名单,不填则允许所有访问
  47. allow:
  48. url-pattern: /druid/*
  49. # 控制台管理用户名和密码
  50. login-username: ruoyi
  51. login-password: 123456
  52. filter:
  53. stat:
  54. enabled: true
  55. # 慢SQL记录
  56. log-slow-sql: true
  57. slow-sql-millis: 1000
  58. merge-sql: true
  59. wall:
  60. config:
  61. multi-statement-allow: true
  62. emqx:
  63. broker: tcp://192.168.0.101:9000
  64. userName: admin
  65. password: houjianwei
  66. cleanSession: true
  67. reconnect: true
  68. timeout: 20
  69. keepAlive: 10
  70. apiUserName: admin
  71. apiPassword: public
  72. apiPath: http://192.168.0.101:8081
  73. downTopicTemplate: "cpyypt/down/%s/%s"
  74. defaultFrameHeader: 0
  75. messageRouters:
  76. - topic: $share/wbjw/cpyypt/up/#
  77. qos: 2
  78. listener: deviceMessageListener
  79. - topic: $share/wbjw/invent/up/#
  80. qos: 2
  81. listener: inventMessageListener
  82. - topic: $SYS/brokers/+/clients/+/disconnected
  83. qos: 2
  84. listener: clientLineStatusListener
  85. - topic: $share/wbjw/cpyypt/logup/#
  86. qos: 2
  87. listener: deviceLogListener