application.yml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. # 项目相关配置
  2. ruoyi:
  3. # 名称
  4. name: RuoYi-Vue-Plus
  5. # 版本
  6. version: ${revision}
  7. # 版权年份
  8. copyrightYear: 2023
  9. # 实例演示开关
  10. demoEnabled: true
  11. # 获取ip地址开关
  12. addressEnabled: true
  13. captcha:
  14. enable: true
  15. # 页面 <参数设置> 可开启关闭 验证码校验
  16. # 验证码类型 math 数组计算 char 字符验证
  17. type: MATH
  18. # line 线段干扰 circle 圆圈干扰 shear 扭曲干扰
  19. category: CIRCLE
  20. # 数字验证码位数
  21. numberLength: 1
  22. # 字符验证码长度
  23. charLength: 4
  24. # 开发环境配置
  25. server:
  26. # 服务器的HTTP端口,默认为8080
  27. port: 8080
  28. servlet:
  29. # 应用的访问路径
  30. context-path: /
  31. # undertow 配置
  32. undertow:
  33. # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
  34. max-http-post-size: -1
  35. # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
  36. # 每块buffer的空间大小,越小的空间被利用越充分
  37. buffer-size: 512
  38. # 是否分配的直接内存
  39. direct-buffers: true
  40. threads:
  41. # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
  42. io: 8
  43. # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
  44. worker: 256
  45. # 日志配置
  46. logging:
  47. level:
  48. org.dromara: @logging.level@
  49. org.springframework: warn
  50. config: classpath:logback-plus.xml
  51. # 用户配置
  52. user:
  53. password:
  54. # 密码最大错误次数
  55. maxRetryCount: 5
  56. # 密码锁定时间(默认10分钟)
  57. lockTime: 10
  58. # Spring配置
  59. spring:
  60. application:
  61. name: ${ruoyi.name}
  62. # 资源信息
  63. messages:
  64. # 国际化资源文件路径
  65. basename: i18n/messages
  66. profiles:
  67. active: @profiles.active@
  68. # 文件上传
  69. servlet:
  70. multipart:
  71. # 单个文件大小
  72. max-file-size: 10MB
  73. # 设置总上传的文件大小
  74. max-request-size: 20MB
  75. mvc:
  76. format:
  77. date-time: yyyy-MM-dd HH:mm:ss
  78. jackson:
  79. # 日期格式化
  80. date-format: yyyy-MM-dd HH:mm:ss
  81. serialization:
  82. # 格式化输出
  83. indent_output: false
  84. # 忽略无法转换的对象
  85. fail_on_empty_beans: false
  86. deserialization:
  87. # 允许对象忽略json中不存在的属性
  88. fail_on_unknown_properties: false
  89. # Sa-Token配置
  90. sa-token:
  91. # token名称 (同时也是cookie名称)
  92. token-name: Authorization
  93. # token固定超时 设为七天 (必定过期) 单位: 秒
  94. timeout: 604800
  95. # 多端不同 token 有效期 可查看 LoginHelper.loginByDevice 方法自定义
  96. # token最低活跃时间 (指定时间无操作就过期) 单位: 秒
  97. active-timeout: 1800
  98. # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
  99. is-concurrent: true
  100. # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
  101. is-share: false
  102. # jwt秘钥
  103. jwt-secret-key: abcdefghijklmnopqrstuvwxyz
  104. # security配置
  105. security:
  106. # 排除路径
  107. excludes:
  108. # 静态资源
  109. - /*.html
  110. - /**/*.html
  111. - /**/*.css
  112. - /**/*.js
  113. # 公共路径
  114. - /favicon.ico
  115. - /error
  116. # swagger 文档配置
  117. - /*/api-docs
  118. - /*/api-docs/**
  119. # actuator 监控配置
  120. - /actuator
  121. - /actuator/**
  122. # 多租户配置
  123. tenant:
  124. # 是否开启
  125. enable: true
  126. # 排除表
  127. excludes:
  128. - sys_menu
  129. - sys_tenant
  130. - sys_tenant_package
  131. - sys_role_dept
  132. - sys_role_menu
  133. - sys_user_post
  134. - sys_user_role
  135. - sys_client
  136. # MyBatisPlus配置
  137. # https://baomidou.com/config/
  138. mybatis-plus:
  139. # 不支持多包, 如有需要可在注解配置 或 提升扫包等级
  140. # 例如 com.**.**.mapper
  141. mapperPackage: org.dromara.**.mapper
  142. # 对应的 XML 文件位置
  143. mapperLocations: classpath*:mapper/**/*Mapper.xml
  144. # 实体扫描,多个package用逗号或者分号分隔
  145. typeAliasesPackage: org.dromara.**.domain
  146. global-config:
  147. dbConfig:
  148. # 主键类型
  149. # AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
  150. # 如需改为自增 需要将数据库表全部设置为自增
  151. idType: ASSIGN_ID
  152. # 数据加密
  153. mybatis-encryptor:
  154. # 是否开启加密
  155. enable: false
  156. # 默认加密算法
  157. algorithm: BASE64
  158. # 编码方式 BASE64/HEX。默认BASE64
  159. encode: BASE64
  160. # 安全秘钥 对称算法的秘钥 如:AES,SM4
  161. password:
  162. # 公私钥 非对称算法的公私钥 如:SM2,RSA
  163. publicKey:
  164. privateKey:
  165. springdoc:
  166. api-docs:
  167. # 是否开启接口文档
  168. enabled: true
  169. swagger-ui:
  170. # 持久化认证数据
  171. persistAuthorization: true
  172. info:
  173. # 标题
  174. title: '标题:${ruoyi.name}多租户管理系统_接口文档'
  175. # 描述
  176. description: '描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...'
  177. # 版本
  178. version: '版本号: ${ruoyi.version}'
  179. # 作者信息
  180. contact:
  181. name: Lion Li
  182. email: crazylionli@163.com
  183. url: https://gitee.com/dromara/RuoYi-Vue-Plus
  184. components:
  185. # 鉴权方式配置
  186. security-schemes:
  187. apiKey:
  188. type: APIKEY
  189. in: HEADER
  190. name: ${sa-token.token-name}
  191. #这里定义了两个分组,可定义多个,也可以不定义
  192. group-configs:
  193. - group: 1.演示模块
  194. packages-to-scan: org.dromara.demo
  195. - group: 2.通用模块
  196. packages-to-scan: org.dromara.web
  197. - group: 3.系统模块
  198. packages-to-scan: org.dromara.system
  199. - group: 4.代码生成模块
  200. packages-to-scan: org.dromara.generator
  201. # 防止XSS攻击
  202. xss:
  203. # 过滤开关
  204. enabled: true
  205. # 排除链接(多个用逗号分隔)
  206. excludes: /system/notice
  207. # 匹配链接
  208. urlPatterns: /system/*,/monitor/*,/tool/*
  209. # 全局线程池相关配置
  210. thread-pool:
  211. # 是否开启线程池
  212. enabled: false
  213. # 队列最大长度
  214. queueCapacity: 128
  215. # 线程池维护线程所允许的空闲时间
  216. keepAliveSeconds: 300
  217. --- # 分布式锁 lock4j 全局配置
  218. lock4j:
  219. # 获取分布式锁超时时间,默认为 3000 毫秒
  220. acquire-timeout: 3000
  221. # 分布式锁的超时时间,默认为 30 秒
  222. expire: 30000
  223. --- # Actuator 监控端点的配置项
  224. management:
  225. endpoints:
  226. web:
  227. exposure:
  228. include: '*'
  229. endpoint:
  230. health:
  231. show-details: ALWAYS
  232. logfile:
  233. external-file: ./logs/sys-console.log
  234. --- # websocket
  235. websocket:
  236. enabled: true
  237. # 路径
  238. path: /websocket
  239. # 设置访问源地址
  240. allowedOrigins: '*'