application.yml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. # 项目相关配置
  2. ruoyi:
  3. # 名称
  4. name: "ruoyi"
  5. # 版本
  6. version: ${revision}
  7. # 版权年份
  8. copyrightYear: 2025
  9. # 实例演示开关
  10. demoEnabled: true
  11. # 获取ip地址开关
  12. addressEnabled: false
  13. captcha:
  14. enable: false
  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: 6039
  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. org.mybatis.spring.mapper: error
  51. org.apache.fury: warn
  52. config: classpath:logback-plus.xml
  53. # 用户配置
  54. user:
  55. password:
  56. # 密码最大错误次数
  57. maxRetryCount: 5
  58. # 密码锁定时间(默认10分钟)
  59. lockTime: 10
  60. # Spring配置
  61. spring:
  62. application:
  63. name: ${ruoyi.name}
  64. # 资源信息
  65. messages:
  66. # 国际化资源文件路径
  67. basename: i18n/messages
  68. profiles:
  69. active: @profiles.active@
  70. # 文件上传
  71. servlet:
  72. multipart:
  73. # 单个文件大小
  74. max-file-size: 50MB
  75. # 设置总上传的文件大小
  76. max-request-size: 200MB
  77. mvc:
  78. format:
  79. date-time: yyyy-MM-dd HH:mm:ss
  80. jackson:
  81. # 日期格式化
  82. date-format: yyyy-MM-dd HH:mm:ss
  83. serialization:
  84. # 格式化输出
  85. indent_output: false
  86. # 忽略无法转换的对象
  87. fail_on_empty_beans: false
  88. deserialization:
  89. # 允许对象忽略json中不存在的属性
  90. fail_on_unknown_properties: false
  91. # Sa-Token配置
  92. sa-token:
  93. # token名称 (同时也是cookie名称)
  94. token-name: Authorization
  95. # token有效期 设为7天 (必定过期) 单位: 秒
  96. timeout: 604800
  97. # token临时有效期 (指定时间无操作就过期) 单位: 秒
  98. activity-timeout: 604800
  99. # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
  100. is-concurrent: true
  101. # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
  102. is-share: false
  103. # 是否尝试从header里读取token
  104. is-read-header: true
  105. # 是否尝试从cookie里读取token
  106. is-read-cookie: false
  107. # token前缀
  108. token-prefix: "Bearer"
  109. # jwt秘钥
  110. jwt-secret-key: abcdefghijklmnopqrstuvwxyz
  111. # security配置
  112. security:
  113. # 排除路径
  114. excludes:
  115. # 支付回调
  116. - /pay/returnUrl
  117. - /pay/notifyUrl
  118. # 上传文件
  119. - /resource/oss/upload
  120. # 重置密码
  121. - /auth/reset/password
  122. # 聊天接口
  123. - /chat
  124. # 静态资源
  125. - /*.html
  126. - /**/*.html
  127. - /**/*.css
  128. - /**/*.js
  129. # 公共路径
  130. - /favicon.ico
  131. - /error
  132. # swagger 文档配置
  133. - /*/api-docs
  134. - /*/api-docs/**
  135. # actuator 监控配置
  136. - /actuator
  137. - /actuator/**
  138. # 多租户配置
  139. tenant:
  140. # 是否开启
  141. enable: false
  142. # 排除表
  143. excludes:
  144. - sys_menu
  145. - sys_tenant
  146. - sys_tenant_package
  147. - sys_role_dept
  148. - sys_role_menu
  149. - sys_user_post
  150. - sys_user_role
  151. # MyBatisPlus配置
  152. # https://baomidou.com/config/
  153. mybatis-plus:
  154. # 不支持多包, 如有需要可在注解配置 或 提升扫包等级
  155. # 例如 com.**.**.mapper
  156. mapperPackage: org.ruoyi.**.mapper
  157. # 对应的 XML 文件位置
  158. mapperLocations: classpath*:mapper/**/*Mapper.xml
  159. # 实体扫描,多个package用逗号或者分号分隔
  160. typeAliasesPackage: org.ruoyi.**.domain
  161. # 启动时是否检查 MyBatis XML 文件的存在,默认不检查
  162. checkConfigLocation: false
  163. configuration:
  164. # 自动驼峰命名规则(camel case)映射
  165. mapUnderscoreToCamelCase: true
  166. # MyBatis 自动映射策略
  167. # NONE:不启用 PARTIAL:只对非嵌套 resultMap 自动映射 FULL:对所有 resultMap 自动映射
  168. autoMappingBehavior: FULL
  169. # MyBatis 自动映射时未知列或未知属性处理策
  170. # NONE:不做处理 WARNING:打印相关警告 FAILING:抛出异常和详细信息
  171. autoMappingUnknownColumnBehavior: NONE
  172. # 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl
  173. # 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl
  174. # 默认日志输出 org.apache.ibatis.logging.slf4j.Slf4jImpl
  175. logImpl: org.apache.ibatis.logging.nologging.NoLoggingImpl
  176. global-config:
  177. # 是否打印 Logo banner
  178. banner: true
  179. dbConfig:
  180. # 主键类型
  181. # AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
  182. idType: ASSIGN_ID
  183. # 逻辑已删除值
  184. logicDeleteValue: 2
  185. # 逻辑未删除值
  186. logicNotDeleteValue: 0
  187. # 字段验证策略之 insert,在 insert 的时候的字段验证策略
  188. # IGNORED 忽略 NOT_NULL 非NULL NOT_EMPTY 非空 DEFAULT 默认 NEVER 不加入 SQL
  189. insertStrategy: NOT_NULL
  190. # 字段验证策略之 update,在 update 的时候的字段验证策略
  191. updateStrategy: NOT_NULL
  192. # 字段验证策略之 select,在 select 的时候的字段验证策略既 wrapper 根据内部 entity 生成的 where 条件
  193. where-strategy: NOT_NULL
  194. # 数据加密
  195. mybatis-encryptor:
  196. # 是否开启加密
  197. enable: false
  198. # 默认加密算法
  199. algorithm: BASE64
  200. # 编码方式 BASE64/HEX。默认BASE64
  201. encode: BASE64
  202. # 安全秘钥 对称算法的秘钥 如:AES,SM4
  203. password:
  204. # 公私钥 非对称算法的公私钥 如:SM2,RSA
  205. publicKey:
  206. privateKey:
  207. # Swagger配置
  208. swagger:
  209. info:
  210. # 标题
  211. title: '标题:${ruoyi.name}多租户管理系统_接口文档'
  212. # 描述
  213. description: '描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...'
  214. # 版本
  215. version: '版本号: ${ruoyi.version}'
  216. # 作者信息
  217. contact:
  218. name: ageerle
  219. email: ageerle@163.com
  220. url: https://gitee.com/ageerle/ruoyi-ai
  221. components:
  222. # 鉴权方式配置
  223. security-schemes:
  224. apiKey:
  225. type: APIKEY
  226. in: HEADER
  227. name: ${sa-token.token-name}
  228. springdoc:
  229. api-docs:
  230. # 是否开启接口文档
  231. enabled: true
  232. swagger-ui:
  233. # 持久化认证数据
  234. persistAuthorization: true
  235. #这里定义了两个分组,可定义多个,也可以不定义
  236. group-configs:
  237. - group: 1.演示模块
  238. packages-to-scan: org.ruoyi.demo
  239. - group: 2.通用模块
  240. packages-to-scan: org.ruoyi.web
  241. - group: 3.系统模块
  242. packages-to-scan: org.ruoyi.system
  243. - group: 4.代码生成模块
  244. packages-to-scan: org.ruoyi.generator
  245. # 防止XSS攻击
  246. xss:
  247. # 过滤开关
  248. enabled: true
  249. # 排除链接(多个用逗号分隔)
  250. excludes: /system/notice
  251. # 匹配链接
  252. urlPatterns: /system/*,/monitor/*,/tool/*
  253. # 全局线程池相关配置
  254. thread-pool:
  255. # 是否开启线程池
  256. enabled: false
  257. # 队列最大长度
  258. queueCapacity: 128
  259. # 线程池维护线程所允许的空闲时间
  260. keepAliveSeconds: 300
  261. --- # 分布式锁 lock4j 全局配置
  262. lock4j:
  263. # 获取分布式锁超时时间,默认为 3000 毫秒
  264. acquire-timeout: 3000
  265. # 分布式锁的超时时间,默认为 30 秒
  266. expire: 30000
  267. --- # Actuator 监控端点的配置项
  268. management:
  269. endpoints:
  270. web:
  271. exposure:
  272. include: '*'
  273. endpoint:
  274. health:
  275. show-details: ALWAYS
  276. logfile:
  277. external-file: ./logs/sys-console.log
  278. # websocket
  279. websocket:
  280. enabled: true
  281. # 路径
  282. path: '/resource/websocket'
  283. # 设置访问源地址
  284. allowedOrigins: '*'
  285. # 微信小程序配置信息
  286. wx:
  287. miniapp:
  288. configs:
  289. - appid: # 你的appid
  290. secret: # 你的secret
  291. token: #微信小程序消息服务器配置的token
  292. aesKey: #微信小程序消息服务器配置的EncodingAESKey
  293. msgDataFormat: JSON
  294. # 企业微信应用
  295. wechat:
  296. cp:
  297. corpId:
  298. appConfigs:
  299. - agentId:
  300. secret: ''
  301. token: ''
  302. aesKey: ''
  303. spring:
  304. ai:
  305. openai:
  306. api-key: sk-xx
  307. base-url: https://api.pandarobot.chat/
  308. mcp:
  309. client:
  310. enabled: false
  311. name: ruoyi-ai-mcp
  312. sse:
  313. connections:
  314. server:
  315. url: http://127.0.0.1:8081
  316. stdio:
  317. servers-configuration: classpath:mcp-server.json