application-prod.yml 10 KB

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