application-prod.yml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  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. --- # powerjob 配置
  13. powerjob:
  14. worker:
  15. # 如何开启调度中心请查看文档教程
  16. enabled: false
  17. # 需要先在 powerjob 登录页执行应用注册后才能使用
  18. app-name: ruoyi-worker
  19. enable-test-mode: false
  20. max-appended-wf-context-length: 4096
  21. max-result-length: 4096
  22. port: 27777
  23. protocol: http
  24. server-address: 127.0.0.1:7700
  25. store-strategy: disk
  26. --- # 数据源配置
  27. spring:
  28. datasource:
  29. type: com.zaxxer.hikari.HikariDataSource
  30. # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
  31. dynamic:
  32. # 性能分析插件(有性能损耗 不建议生产环境使用)
  33. p6spy: false
  34. # 设置默认的数据源或者数据源组,默认值即为 master
  35. primary: master
  36. # 严格模式 匹配不到数据源则报错
  37. strict: true
  38. datasource:
  39. # 主库数据源
  40. master:
  41. type: ${spring.datasource.type}
  42. driverClassName: com.mysql.cj.jdbc.Driver
  43. # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
  44. # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
  45. url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  46. username: root
  47. password: root
  48. # 从库数据源
  49. slave:
  50. lazy: true
  51. type: ${spring.datasource.type}
  52. driverClassName: com.mysql.cj.jdbc.Driver
  53. url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  54. username:
  55. password:
  56. # oracle:
  57. # type: ${spring.datasource.type}
  58. # driverClassName: oracle.jdbc.OracleDriver
  59. # url: jdbc:oracle:thin:@//localhost:1521/XE
  60. # username: ROOT
  61. # password: root
  62. # hikari:
  63. # connectionTestQuery: SELECT 1 FROM DUAL
  64. # postgres:
  65. # type: ${spring.datasource.type}
  66. # driverClassName: org.postgresql.Driver
  67. # url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
  68. # username: root
  69. # password: root
  70. # sqlserver:
  71. # type: ${spring.datasource.type}
  72. # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
  73. # url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
  74. # username: SA
  75. # password: root
  76. hikari:
  77. # 最大连接池数量
  78. maxPoolSize: 20
  79. # 最小空闲线程数量
  80. minIdle: 10
  81. # 配置获取连接等待超时的时间
  82. connectionTimeout: 30000
  83. # 校验超时时间
  84. validationTimeout: 5000
  85. # 空闲连接存活最大时间,默认10分钟
  86. idleTimeout: 600000
  87. # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
  88. maxLifetime: 1800000
  89. # 连接测试query(配置检测连接是否有效)
  90. connectionTestQuery: SELECT 1
  91. # 多久检查一次连接的活性
  92. keepaliveTime: 30000
  93. --- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
  94. spring.data:
  95. redis:
  96. # 地址
  97. host: localhost
  98. # 端口,默认为6379
  99. port: 6379
  100. # 数据库索引
  101. database: 0
  102. # 密码(如没有密码请注释掉)
  103. # password:
  104. # 连接超时时间
  105. timeout: 10s
  106. # 是否开启ssl
  107. ssl: false
  108. redisson:
  109. # redis key前缀
  110. keyPrefix:
  111. # 线程池数量
  112. threads: 16
  113. # Netty线程池数量
  114. nettyThreads: 32
  115. # 单节点配置
  116. singleServerConfig:
  117. # 客户端名称
  118. clientName: ${ruoyi.name}
  119. # 最小空闲连接数
  120. connectionMinimumIdleSize: 32
  121. # 连接池大小
  122. connectionPoolSize: 64
  123. # 连接空闲超时,单位:毫秒
  124. idleConnectionTimeout: 10000
  125. # 命令等待超时,单位:毫秒
  126. timeout: 3000
  127. # 发布和订阅连接池大小
  128. subscriptionConnectionPoolSize: 50
  129. --- # mail 邮件发送
  130. mail:
  131. enabled: false
  132. host: smtp.163.com
  133. port: 465
  134. # 是否需要用户名密码验证
  135. auth: true
  136. # 发送方,遵循RFC-822标准
  137. from: xxx@163.com
  138. # 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
  139. user: xxx@163.com
  140. # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
  141. pass: xxxxxxxxxx
  142. # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
  143. starttlsEnable: true
  144. # 使用SSL安全连接
  145. sslEnable: true
  146. # SMTP超时时长,单位毫秒,缺省值不超时
  147. timeout: 0
  148. # Socket连接超时值,单位毫秒,缺省值不超时
  149. connectionTimeout: 0
  150. --- # sms 短信 支持 阿里云 腾讯云 云片 等等各式各样的短信服务商
  151. # https://wind.kim/doc/start 文档地址 各个厂商可同时使用
  152. sms:
  153. # 阿里云 dysmsapi.aliyuncs.com
  154. alibaba:
  155. #请求地址 默认为 dysmsapi.aliyuncs.com 如无特殊改变可以不用设置
  156. requestUrl: dysmsapi.aliyuncs.com
  157. #阿里云的accessKey
  158. accessKeyId: xxxxxxx
  159. #阿里云的accessKeySecret
  160. accessKeySecret: xxxxxxx
  161. #短信签名
  162. signature: 测试
  163. tencent:
  164. #请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置
  165. requestUrl: sms.tencentcloudapi.com
  166. #腾讯云的accessKey
  167. accessKeyId: xxxxxxx
  168. #腾讯云的accessKeySecret
  169. accessKeySecret: xxxxxxx
  170. #短信签名
  171. signature: 测试
  172. #短信sdkAppId
  173. sdkAppId: appid
  174. #地域信息默认为 ap-guangzhou 如无特殊改变可不用设置
  175. territory: ap-guangzhou