application-prod.yml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. --- # 临时文件存储位置 避免临时文件被系统清理报错
  2. spring.servlet.multipart.location: /ruoyi/server/temp
  3. --- # 监控中心配置
  4. spring.boot.admin.client:
  5. # 增加客户端开关
  6. enabled: true
  7. url: http://localhost:9090/admin
  8. instance:
  9. service-host-type: IP
  10. username: ruoyi
  11. password: 123456
  12. --- # xxl-job 配置
  13. xxl.job:
  14. # 执行器开关
  15. enabled: true
  16. # 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
  17. admin-addresses: http://localhost:9100/xxl-job-admin
  18. # 执行器通讯TOKEN:非空时启用
  19. access-token: xxl-job
  20. executor:
  21. # 执行器AppName:执行器心跳注册分组依据;为空则关闭自动注册
  22. appname: xxl-job-executor
  23. # 执行器端口号 执行器从9101开始往后写
  24. port: 9101
  25. # 执行器注册:默认IP:PORT
  26. address:
  27. # 执行器IP:默认自动获取IP
  28. ip:
  29. # 执行器运行日志文件存储磁盘路径
  30. logpath: ./logs/xxl-job
  31. # 执行器日志文件保存天数:大于3生效
  32. logretentiondays: 30
  33. --- # 数据源配置
  34. spring:
  35. datasource:
  36. type: com.zaxxer.hikari.HikariDataSource
  37. # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
  38. dynamic:
  39. # 性能分析插件(有性能损耗 不建议生产环境使用)
  40. p6spy: false
  41. # 设置默认的数据源或者数据源组,默认值即为 master
  42. primary: master
  43. # 严格模式 匹配不到数据源则报错
  44. strict: true
  45. datasource:
  46. # 主库数据源
  47. master:
  48. type: ${spring.datasource.type}
  49. driverClassName: com.mysql.cj.jdbc.Driver
  50. # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
  51. # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
  52. url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  53. username: root
  54. password: root
  55. # 从库数据源
  56. slave:
  57. lazy: true
  58. type: ${spring.datasource.type}
  59. driverClassName: com.mysql.cj.jdbc.Driver
  60. url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  61. username:
  62. password:
  63. # oracle:
  64. # type: ${spring.datasource.type}
  65. # driverClassName: oracle.jdbc.OracleDriver
  66. # url: jdbc:oracle:thin:@//localhost:1521/XE
  67. # username: ROOT
  68. # password: root
  69. # hikari:
  70. # connectionTestQuery: SELECT 1 FROM DUAL
  71. # postgres:
  72. # type: ${spring.datasource.type}
  73. # driverClassName: org.postgresql.Driver
  74. # url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
  75. # username: root
  76. # password: root
  77. # sqlserver:
  78. # type: ${spring.datasource.type}
  79. # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
  80. # url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
  81. # username: SA
  82. # password: root
  83. hikari:
  84. # 最大连接池数量
  85. maxPoolSize: 20
  86. # 最小空闲线程数量
  87. minIdle: 10
  88. # 配置获取连接等待超时的时间
  89. connectionTimeout: 30000
  90. # 校验超时时间
  91. validationTimeout: 5000
  92. # 空闲连接存活最大时间,默认10分钟
  93. idleTimeout: 600000
  94. # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
  95. maxLifetime: 900000
  96. # 连接测试query(配置检测连接是否有效)
  97. connectionTestQuery: SELECT 1
  98. --- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
  99. spring.data:
  100. redis:
  101. # 地址
  102. host: localhost
  103. # 端口,默认为6379
  104. port: 6379
  105. # 数据库索引
  106. database: 0
  107. # 密码(如没有密码请注释掉)
  108. # password:
  109. # 连接超时时间
  110. timeout: 10s
  111. # 是否开启ssl
  112. ssl: false
  113. redisson:
  114. # redis key前缀
  115. keyPrefix:
  116. # 线程池数量
  117. threads: 16
  118. # Netty线程池数量
  119. nettyThreads: 32
  120. # 单节点配置
  121. singleServerConfig:
  122. # 客户端名称
  123. clientName: ${ruoyi.name}
  124. # 最小空闲连接数
  125. connectionMinimumIdleSize: 32
  126. # 连接池大小
  127. connectionPoolSize: 64
  128. # 连接空闲超时,单位:毫秒
  129. idleConnectionTimeout: 10000
  130. # 命令等待超时,单位:毫秒
  131. timeout: 3000
  132. # 发布和订阅连接池大小
  133. subscriptionConnectionPoolSize: 50
  134. --- # mail 邮件发送
  135. mail:
  136. enabled: false
  137. host: smtp.163.com
  138. port: 465
  139. # 是否需要用户名密码验证
  140. auth: true
  141. # 发送方,遵循RFC-822标准
  142. from: xxx@163.com
  143. # 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
  144. user: xxx@163.com
  145. # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
  146. pass: xxxxxxxxxx
  147. # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
  148. starttlsEnable: true
  149. # 使用SSL安全连接
  150. sslEnable: true
  151. # SMTP超时时长,单位毫秒,缺省值不超时
  152. timeout: 0
  153. # Socket连接超时值,单位毫秒,缺省值不超时
  154. connectionTimeout: 0
  155. --- # sms 短信
  156. sms:
  157. enabled: false
  158. # 阿里云 dysmsapi.aliyuncs.com
  159. # 腾讯云 sms.tencentcloudapi.com
  160. endpoint: "dysmsapi.aliyuncs.com"
  161. accessKeyId: xxxxxxx
  162. accessKeySecret: xxxxxx
  163. signName: 测试
  164. # 腾讯专用
  165. sdkAppId: