application-prod.yml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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.alibaba.druid.pool.DruidDataSource
  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. driverClassName: com.mysql.cj.jdbc.Driver
  49. # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
  50. # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
  51. url: jdbc:mysql://localhost:3306/arproject?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  52. username: root
  53. password: baiyuhui1030
  54. # 从库数据源
  55. # slave:
  56. # lazy: true
  57. # driverClassName: com.mysql.cj.jdbc.Driver
  58. # url:
  59. # username:
  60. # password:
  61. # oracle:
  62. # driverClassName: oracle.jdbc.OracleDriver
  63. # url: jdbc:oracle:thin:@//localhost:1521/XE
  64. # username: ROOT
  65. # password: root
  66. # druid:
  67. # validationQuery: SELECT 1 FROM DUAL
  68. # postgres:
  69. # driverClassName: org.postgresql.Driver
  70. # url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
  71. # username: root
  72. # password: root
  73. # sqlserver:
  74. # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
  75. # url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;rewriteBatchedStatements=true
  76. # username: SA
  77. # password: root
  78. druid:
  79. # 初始连接数
  80. initialSize: 5
  81. # 最小连接池数量
  82. minIdle: 10
  83. # 最大连接池数量
  84. maxActive: 20
  85. # 配置获取连接等待超时的时间
  86. maxWait: 60000
  87. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  88. timeBetweenEvictionRunsMillis: 60000
  89. # 配置一个连接在池中最小生存的时间,单位是毫秒
  90. minEvictableIdleTimeMillis: 300000
  91. # 配置一个连接在池中最大生存的时间,单位是毫秒
  92. maxEvictableIdleTimeMillis: 900000
  93. # 配置检测连接是否有效
  94. validationQuery: SELECT 1
  95. testWhileIdle: true
  96. testOnBorrow: false
  97. testOnReturn: false
  98. # 注意这个值和druid原生不一致,默认启动了stat
  99. filters: stat
  100. --- # druid 配置
  101. spring.datasource.druid:
  102. webStatFilter:
  103. enabled: true
  104. statViewServlet:
  105. enabled: true
  106. # 设置白名单,不填则允许所有访问
  107. allow:
  108. url-pattern: /druid/*
  109. # 控制台管理用户名和密码
  110. login-username: ruoyi
  111. login-password: 123456
  112. filter:
  113. stat:
  114. enabled: true
  115. # 慢SQL记录
  116. log-slow-sql: true
  117. slow-sql-millis: 1000
  118. merge-sql: true
  119. wall:
  120. config:
  121. multi-statement-allow: true
  122. --- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
  123. spring:
  124. redis:
  125. # 地址
  126. host: localhost
  127. # 端口,默认为6379
  128. port: 6379
  129. # 数据库索引
  130. database: 0
  131. # 密码(如没有密码请注释掉)
  132. # password:
  133. # 连接超时时间
  134. timeout: 10s
  135. # 是否开启ssl
  136. ssl: false
  137. redisson:
  138. # redis key前缀
  139. keyPrefix:
  140. # 线程池数量
  141. threads: 16
  142. # Netty线程池数量
  143. nettyThreads: 32
  144. # 单节点配置
  145. singleServerConfig:
  146. # 客户端名称
  147. clientName: ${ruoyi.name}
  148. # 最小空闲连接数
  149. connectionMinimumIdleSize: 32
  150. # 连接池大小
  151. connectionPoolSize: 64
  152. # 连接空闲超时,单位:毫秒
  153. idleConnectionTimeout: 10000
  154. # 命令等待超时,单位:毫秒
  155. timeout: 3000
  156. # 发布和订阅连接池大小
  157. subscriptionConnectionPoolSize: 50
  158. --- # mail 邮件发送
  159. mail:
  160. enabled: false
  161. host: smtp.163.com
  162. port: 465
  163. # 是否需要用户名密码验证
  164. auth: true
  165. # 发送方,遵循RFC-822标准
  166. from: xxx@163.com
  167. # 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
  168. user: xxx@163.com
  169. # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
  170. pass: xxxxxxxxxx
  171. # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
  172. starttlsEnable: true
  173. # 使用SSL安全连接
  174. sslEnable: true
  175. # SMTP超时时长,单位毫秒,缺省值不超时
  176. timeout: 0
  177. # Socket连接超时值,单位毫秒,缺省值不超时
  178. connectionTimeout: 0
  179. --- # sms 短信
  180. sms:
  181. enabled: false
  182. # 阿里云 dysmsapi.aliyuncs.com
  183. # 腾讯云 sms.tencentcloudapi.com
  184. endpoint: "dysmsapi.aliyuncs.com"
  185. accessKeyId: xxxxxxx
  186. accessKeySecret: xxxxxx
  187. signName: 测试
  188. # 腾讯专用
  189. sdkAppId: