application-prod.yml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  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. --- # snail-job 配置
  13. snail-job:
  14. enabled: false
  15. # 需要在 SnailJob 后台组管理创建对应名称的组,然后创建任务的时候选择对应的组,才能正确分派任务
  16. group-name: "ruoyi_group"
  17. # SnailJob 接入验证令牌 详见 script/sql/snail_job.sql `sj_group_config` 表
  18. token: "SJ_cKqBTPzCsWA3VyuCfFoccmuIEGXjr5KT"
  19. server:
  20. host: 127.0.0.1
  21. port: 1788
  22. # 详见 script/sql/snail_job.sql `sj_namespace` 表
  23. namespace: ${spring.profiles.active}
  24. --- # 数据源配置
  25. spring:
  26. datasource:
  27. type: com.zaxxer.hikari.HikariDataSource
  28. # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
  29. dynamic:
  30. # 性能分析插件(有性能损耗 不建议生产环境使用)
  31. p6spy: false
  32. # 设置默认的数据源或者数据源组,默认值即为 master
  33. primary: master
  34. # 严格模式 匹配不到数据源则报错
  35. strict: true
  36. datasource:
  37. # 主库数据源
  38. master:
  39. type: ${spring.datasource.type}
  40. driverClassName: com.mysql.cj.jdbc.Driver
  41. # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
  42. # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
  43. url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
  44. username: root
  45. password: root
  46. # 从库数据源
  47. slave:
  48. lazy: true
  49. type: ${spring.datasource.type}
  50. driverClassName: com.mysql.cj.jdbc.Driver
  51. url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
  52. username:
  53. password:
  54. # oracle:
  55. # type: ${spring.datasource.type}
  56. # driverClassName: oracle.jdbc.OracleDriver
  57. # url: jdbc:oracle:thin:@//localhost:1521/XE
  58. # username: ROOT
  59. # password: root
  60. # postgres:
  61. # type: ${spring.datasource.type}
  62. # driverClassName: org.postgresql.Driver
  63. # url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
  64. # username: root
  65. # password: root
  66. # sqlserver:
  67. # type: ${spring.datasource.type}
  68. # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
  69. # url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
  70. # username: SA
  71. # password: root
  72. hikari:
  73. # 最大连接池数量
  74. maxPoolSize: 20
  75. # 最小空闲线程数量
  76. minIdle: 10
  77. # 配置获取连接等待超时的时间
  78. connectionTimeout: 30000
  79. # 校验超时时间
  80. validationTimeout: 5000
  81. # 空闲连接存活最大时间,默认10分钟
  82. idleTimeout: 600000
  83. # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
  84. maxLifetime: 1800000
  85. # 多久检查一次连接的活性
  86. keepaliveTime: 30000
  87. --- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
  88. spring.data:
  89. redis:
  90. # 地址
  91. host: localhost
  92. # 端口,默认为6379
  93. port: 6379
  94. # 数据库索引
  95. database: 0
  96. # 密码(如没有密码请注释掉)
  97. # password:
  98. # 连接超时时间
  99. timeout: 10s
  100. # 是否开启ssl
  101. ssl.enabled: false
  102. redisson:
  103. # redis key前缀
  104. keyPrefix:
  105. # 线程池数量
  106. threads: 16
  107. # Netty线程池数量
  108. nettyThreads: 32
  109. # 单节点配置
  110. singleServerConfig:
  111. # 客户端名称
  112. clientName: ${ruoyi.name}
  113. # 最小空闲连接数
  114. connectionMinimumIdleSize: 32
  115. # 连接池大小
  116. connectionPoolSize: 64
  117. # 连接空闲超时,单位:毫秒
  118. idleConnectionTimeout: 10000
  119. # 命令等待超时,单位:毫秒
  120. timeout: 3000
  121. # 发布和订阅连接池大小
  122. subscriptionConnectionPoolSize: 50
  123. --- # mail 邮件发送
  124. mail:
  125. enabled: false
  126. host: smtp.163.com
  127. port: 465
  128. # 是否需要用户名密码验证
  129. auth: true
  130. # 发送方,遵循RFC-822标准
  131. from: xxx@163.com
  132. # 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
  133. user: xxx@163.com
  134. # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
  135. pass: xxxxxxxxxx
  136. # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
  137. starttlsEnable: true
  138. # 使用SSL安全连接
  139. sslEnable: true
  140. # SMTP超时时长,单位毫秒,缺省值不超时
  141. timeout: 0
  142. # Socket连接超时值,单位毫秒,缺省值不超时
  143. connectionTimeout: 0
  144. --- # sms 短信 支持 阿里云 腾讯云 云片 等等各式各样的短信服务商
  145. # https://sms4j.com/doc3/ 差异配置文档地址 支持单厂商多配置,可以配置多个同时使用
  146. sms:
  147. # 配置源类型用于标定配置来源(interface,yaml)
  148. config-type: yaml
  149. # 用于标定yml中的配置是否开启短信拦截,接口配置不受此限制
  150. restricted: true
  151. # 短信拦截限制单手机号每分钟最大发送,只对开启了拦截的配置有效
  152. minute-max: 1
  153. # 短信拦截限制单手机号每日最大发送量,只对开启了拦截的配置有效
  154. account-max: 30
  155. # 以下配置来自于 org.dromara.sms4j.provider.config.BaseConfig类中
  156. blends:
  157. # 唯一ID 用于发送短信寻找具体配置 随便定义别用中文即可
  158. # 可以同时存在两个相同厂商 例如: ali1 ali2 两个不同的阿里短信账号 也可用于区分租户
  159. config1:
  160. # 框架定义的厂商名称标识,标定此配置是哪个厂商,详细请看厂商标识介绍部分
  161. supplier: alibaba
  162. # 有些称为accessKey有些称之为apiKey,也有称为sdkKey或者appId。
  163. access-key-id: 您的accessKey
  164. # 称为accessSecret有些称之为apiSecret
  165. access-key-secret: 您的accessKeySecret
  166. signature: 您的短信签名
  167. sdk-app-id: 您的sdkAppId
  168. config2:
  169. # 厂商标识,标定此配置是哪个厂商,详细请看厂商标识介绍部分
  170. supplier: tencent
  171. access-key-id: 您的accessKey
  172. access-key-secret: 您的accessKeySecret
  173. signature: 您的短信签名
  174. sdk-app-id: 您的sdkAppId
  175. --- # 三方授权
  176. justauth:
  177. # 前端外网访问地址
  178. address: http://localhost:80
  179. type:
  180. maxkey:
  181. # maxkey 服务器地址
  182. # 注意 如下均配置均不需要修改 maxkey 已经内置好了数据
  183. server-url: http://sso.maxkey.top
  184. client-id: 876892492581044224
  185. client-secret: x1Y5MTMwNzIwMjMxNTM4NDc3Mzche8
  186. redirect-uri: ${justauth.address}/social-callback?source=maxkey
  187. topiam:
  188. # topiam 服务器地址
  189. server-url: http://127.0.0.1:1989/api/v1/authorize/y0q************spq***********8ol
  190. client-id: 449c4*********937************759
  191. client-secret: ac7***********1e0************28d
  192. redirect-uri: ${justauth.address}/social-callback?source=topiam
  193. scopes: [ openid, email, phone, profile ]
  194. qq:
  195. client-id: 10**********6
  196. client-secret: 1f7d08**********5b7**********29e
  197. redirect-uri: ${justauth.address}/social-callback?source=qq
  198. union-id: false
  199. weibo:
  200. client-id: 10**********6
  201. client-secret: 1f7d08**********5b7**********29e
  202. redirect-uri: ${justauth.address}/social-callback?source=weibo
  203. gitee:
  204. client-id: 91436b7940090d09c72c7daf85b959cfd5f215d67eea73acbf61b6b590751a98
  205. client-secret: 02c6fcfd70342980cd8dd2f2c06c1a350645d76c754d7a264c4e125f9ba915ac
  206. redirect-uri: ${justauth.address}/social-callback?source=gitee
  207. dingtalk:
  208. client-id: 10**********6
  209. client-secret: 1f7d08**********5b7**********29e
  210. redirect-uri: ${justauth.address}/social-callback?source=dingtalk
  211. baidu:
  212. client-id: 10**********6
  213. client-secret: 1f7d08**********5b7**********29e
  214. redirect-uri: ${justauth.address}/social-callback?source=baidu
  215. csdn:
  216. client-id: 10**********6
  217. client-secret: 1f7d08**********5b7**********29e
  218. redirect-uri: ${justauth.address}/social-callback?source=csdn
  219. coding:
  220. client-id: 10**********6
  221. client-secret: 1f7d08**********5b7**********29e
  222. redirect-uri: ${justauth.address}/social-callback?source=coding
  223. coding-group-name: xx
  224. oschina:
  225. client-id: 10**********6
  226. client-secret: 1f7d08**********5b7**********29e
  227. redirect-uri: ${justauth.address}/social-callback?source=oschina
  228. alipay_wallet:
  229. client-id: 10**********6
  230. client-secret: 1f7d08**********5b7**********29e
  231. redirect-uri: ${justauth.address}/social-callback?source=alipay_wallet
  232. alipay-public-key: MIIB**************DAQAB
  233. wechat_open:
  234. client-id: 10**********6
  235. client-secret: 1f7d08**********5b7**********29e
  236. redirect-uri: ${justauth.address}/social-callback?source=wechat_open
  237. wechat_mp:
  238. client-id: 10**********6
  239. client-secret: 1f7d08**********5b7**********29e
  240. redirect-uri: ${justauth.address}/social-callback?source=wechat_mp
  241. wechat_enterprise:
  242. client-id: 10**********6
  243. client-secret: 1f7d08**********5b7**********29e
  244. redirect-uri: ${justauth.address}/social-callback?source=wechat_enterprise
  245. agent-id: 1000002
  246. gitlab:
  247. client-id: 10**********6
  248. client-secret: 1f7d08**********5b7**********29e
  249. redirect-uri: ${justauth.address}/social-callback?source=gitlab