application-dev.yml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # 数据源配置
  2. spring:
  3. autoconfigure:
  4. exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
  5. datasource:
  6. type: com.alibaba.druid.pool.DruidDataSource
  7. dynamic:
  8. datasource:
  9. # 主库数据源
  10. master:
  11. driverClassName: com.mysql.cj.jdbc.Driver
  12. url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
  13. username: root
  14. password: root
  15. # 从库数据源
  16. slave:
  17. driverClassName: com.mysql.cj.jdbc.Driver
  18. url:
  19. username:
  20. password:
  21. druid:
  22. # 初始连接数
  23. initialSize: 5
  24. # 最小连接池数量
  25. minIdle: 10
  26. # 最大连接池数量
  27. maxActive: 20
  28. # 配置获取连接等待超时的时间
  29. maxWait: 60000
  30. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  31. timeBetweenEvictionRunsMillis: 60000
  32. # 配置一个连接在池中最小生存的时间,单位是毫秒
  33. minEvictableIdleTimeMillis: 300000
  34. # 配置一个连接在池中最大生存的时间,单位是毫秒
  35. maxEvictableIdleTimeMillis: 900000
  36. # 配置检测连接是否有效
  37. validationQuery: SELECT 1 FROM DUAL
  38. testWhileIdle: true
  39. testOnBorrow: false
  40. testOnReturn: false
  41. # 注意这个值和druid原生不一致,默认启动了stat
  42. filters: stat
  43. webStatFilter:
  44. enabled: true
  45. statViewServlet:
  46. enabled: true
  47. # 设置白名单,不填则允许所有访问
  48. allow:
  49. url-pattern: /druid/*
  50. # 控制台管理用户名和密码
  51. login-username: ruoyi
  52. login-password: 123456
  53. filter:
  54. stat:
  55. enabled: true
  56. # 慢SQL记录
  57. log-slow-sql: true
  58. slow-sql-millis: 1000
  59. merge-sql: true
  60. wall:
  61. config:
  62. multi-statement-allow: true
  63. # redis 配置
  64. redis:
  65. # 地址
  66. host: localhost
  67. # 端口,默认为6379
  68. port: 6379
  69. # 数据库索引
  70. database: 0
  71. # 密码
  72. password:
  73. # 连接超时时间
  74. timeout: 10s
  75. # 是否开启ssl
  76. ssl: false
  77. --- # redisson 客户端配置
  78. redisson:
  79. # 线程池数量
  80. threads: 16
  81. # Netty线程池数量
  82. nettyThreads: 32
  83. # 传输模式
  84. transportMode: "NIO"
  85. # 单节点配置
  86. singleServerConfig:
  87. # 客户端名称
  88. clientName: ${ruoyi.name}
  89. # 最小空闲连接数
  90. connectionMinimumIdleSize: 32
  91. # 连接池大小
  92. connectionPoolSize: 64
  93. # 连接空闲超时,单位:毫秒
  94. idleConnectionTimeout: 10000
  95. # 命令等待超时,单位:毫秒
  96. timeout: 3000
  97. # 如果尝试在此限制之内发送成功,则开始启用 timeout 计时。
  98. retryAttempts: 3
  99. # 命令重试发送时间间隔,单位:毫秒
  100. retryInterval: 1500
  101. # 发布和订阅连接的最小空闲连接数
  102. subscriptionConnectionMinimumIdleSize: 1
  103. # 发布和订阅连接池大小
  104. subscriptionConnectionPoolSize: 50
  105. # 单个连接最大订阅数量
  106. subscriptionsPerConnection: 5
  107. # DNS监测时间间隔,单位:毫秒
  108. dnsMonitoringInterval: 5000