application-dev.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. ---
  2. server:
  3. port: 8081
  4. ---
  5. # 数据源配置
  6. spring:
  7. datasource:
  8. type: com.alibaba.druid.pool.DruidDataSource
  9. driverClassName: com.mysql.cj.jdbc.Driver
  10. druid:
  11. # 主库数据源
  12. master:
  13. url: jdbc:mysql://39.101.143.184:3306/ruoyi-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
  14. username: ruoyi-vue
  15. password: ryvue
  16. # 从库数据源
  17. slave:
  18. # 从数据源开关/默认关闭
  19. enabled: false
  20. url:
  21. username:
  22. password:
  23. # 初始连接数
  24. initialSize: 5
  25. # 最小连接池数量
  26. minIdle: 10
  27. # 最大连接池数量
  28. maxActive: 20
  29. # 配置获取连接等待超时的时间
  30. maxWait: 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. # redis 配置
  63. redis:
  64. # 地址
  65. host: 39.101.143.184
  66. # 端口,默认为6379
  67. port: 6379
  68. # 数据库索引
  69. database: 0
  70. # 密码
  71. password: ryvue
  72. # 连接超时时间
  73. timeout: 10s
  74. lettuce:
  75. pool:
  76. # 连接池中的最小空闲连接
  77. min-idle: 0
  78. # 连接池中的最大空闲连接
  79. max-idle: 8
  80. # 连接池的最大数据库连接数
  81. max-active: 8
  82. # #连接池最大阻塞等待时间(使用负值表示没有限制)
  83. max-wait: -1ms