application-dev.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # 数据源配置
  2. spring:
  3. cloud:
  4. nacos:
  5. discovery:
  6. ip: 82.156.209.15 # 可指定 注册IP 默认注册服务启动的机器的内网IP
  7. server-addr: 82.156.209.15:8848
  8. # redis 配置
  9. redis:
  10. # 地址
  11. host: 62.234.54.84
  12. # 端口,默认为6379
  13. port: 16379
  14. # 数据库索引
  15. database: 8
  16. # 密码
  17. password: yuchang@2023
  18. # 连接超时时间
  19. timeout: 10s
  20. lettuce:
  21. pool:
  22. # 连接池中的最小空闲连接
  23. min-idle: 0
  24. # 连接池中的最大空闲连接
  25. max-idle: 8
  26. # 连接池的最大数据库连接数
  27. max-active: 8
  28. # #连接池最大阻塞等待时间(使用负值表示没有限制)
  29. max-wait: -1ms
  30. datasource:
  31. type: com.alibaba.druid.pool.DruidDataSource
  32. driverClassName: com.mysql.cj.jdbc.Driver
  33. druid:
  34. # 主库数据源
  35. master:
  36. url: jdbc:mysql://82.156.209.15:3306/ezhizao_yzbh_v2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=true&rewriteBatchedStatements=true&serverTimezone=GMT%2B8&connectTimeout=360000&socketTimeout=360000
  37. username: admin
  38. password: ~44rC%0J
  39. # 初始连接数
  40. initialSize: 5
  41. # 最小连接池数量
  42. minIdle: 10
  43. # 最大连接池数量
  44. maxActive: 20
  45. # 配置获取连接等待超时的时间
  46. maxWait: 60000
  47. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  48. timeBetweenEvictionRunsMillis: 60000
  49. # 配置一个连接在池中最小生存的时间,单位是毫秒
  50. minEvictableIdleTimeMillis: 300000
  51. # 配置一个连接在池中最大生存的时间,单位是毫秒
  52. maxEvictableIdleTimeMillis: 900000
  53. # 配置检测连接是否有效
  54. validationQuery: SELECT 1 FROM DUAL
  55. testWhileIdle: true
  56. testOnBorrow: false
  57. testOnReturn: false
  58. webStatFilter:
  59. enabled: true
  60. statViewServlet:
  61. enabled: true
  62. # 设置白名单,不填则允许所有访问
  63. allow:
  64. url-pattern: /druid/*
  65. # 控制台管理用户名和密码
  66. login-username: ezhizao
  67. login-password: 123456
  68. filter:
  69. stat:
  70. enabled: true
  71. # 慢SQL记录
  72. log-slow-sql: true
  73. slow-sql-millis: 1000
  74. merge-sql: true
  75. wall:
  76. config:
  77. multi-statement-allow: true
  78. socket-timeout: 3600000
  79. # 文件上传
  80. ruoyi:
  81. profile: /home/ruoyi/yzbh/