application.yml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. # 项目相关配置
  2. ruoyi:
  3. # 名称
  4. name: "xmzs"
  5. # 版本
  6. version: ${revision}
  7. # 版权年份
  8. copyrightYear: 2023
  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. com.xmzs: @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有效期 设为7天 (必定过期) 单位: 秒
  94. timeout: 604800
  95. # token临时有效期 (指定时间无操作就过期) 单位: 秒
  96. activity-timeout: 604800
  97. # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
  98. is-concurrent: true
  99. # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
  100. is-share: false
  101. # 是否尝试从header里读取token
  102. is-read-header: true
  103. # 是否尝试从cookie里读取token
  104. is-read-cookie: false
  105. # token前缀
  106. token-prefix: "Bearer"
  107. # jwt秘钥
  108. jwt-secret-key: abcdefghijklmnopqrstuvwxyz
  109. # security配置
  110. security:
  111. # 排除路径
  112. excludes:
  113. # 修改用户头像
  114. - /system/user/edit/avatar
  115. - /pay/returnUrl
  116. - /pay/notifyUrl
  117. # 上传文件
  118. - /resource/oss/upload
  119. # 重置密码
  120. - /auth/reset/password
  121. # 聊天接口
  122. - /chat
  123. # 静态资源
  124. - /*.html
  125. - /**/*.html
  126. - /**/*.css
  127. - /**/*.js
  128. # 公共路径
  129. - /favicon.ico
  130. - /error
  131. # swagger 文档配置
  132. - /*/api-docs
  133. - /*/api-docs/**
  134. # actuator 监控配置
  135. - /actuator
  136. - /actuator/**
  137. # 多租户配置
  138. tenant:
  139. # 是否开启
  140. enable: false
  141. # 排除表
  142. excludes:
  143. - sys_menu
  144. - sys_tenant
  145. - sys_tenant_package
  146. - sys_role_dept
  147. - sys_role_menu
  148. - sys_user_post
  149. - sys_user_role
  150. # MyBatisPlus配置
  151. # https://baomidou.com/config/
  152. mybatis-plus:
  153. # 不支持多包, 如有需要可在注解配置 或 提升扫包等级
  154. # 例如 com.**.**.mapper
  155. mapperPackage: com.xmzs.**.mapper
  156. # 对应的 XML 文件位置
  157. mapperLocations: classpath*:mapper/**/*Mapper.xml
  158. # 实体扫描,多个package用逗号或者分号分隔
  159. typeAliasesPackage: com.xmzs.**.domain
  160. # 启动时是否检查 MyBatis XML 文件的存在,默认不检查
  161. checkConfigLocation: false
  162. configuration:
  163. # 自动驼峰命名规则(camel case)映射
  164. mapUnderscoreToCamelCase: true
  165. # MyBatis 自动映射策略
  166. # NONE:不启用 PARTIAL:只对非嵌套 resultMap 自动映射 FULL:对所有 resultMap 自动映射
  167. autoMappingBehavior: FULL
  168. # MyBatis 自动映射时未知列或未知属性处理策
  169. # NONE:不做处理 WARNING:打印相关警告 FAILING:抛出异常和详细信息
  170. autoMappingUnknownColumnBehavior: NONE
  171. # 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl
  172. # 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl
  173. # 默认日志输出 org.apache.ibatis.logging.slf4j.Slf4jImpl
  174. logImpl: org.apache.ibatis.logging.nologging.NoLoggingImpl
  175. global-config:
  176. # 是否打印 Logo banner
  177. banner: true
  178. dbConfig:
  179. # 主键类型
  180. # AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
  181. idType: ASSIGN_ID
  182. # 逻辑已删除值
  183. logicDeleteValue: 2
  184. # 逻辑未删除值
  185. logicNotDeleteValue: 0
  186. # 字段验证策略之 insert,在 insert 的时候的字段验证策略
  187. # IGNORED 忽略 NOT_NULL 非NULL NOT_EMPTY 非空 DEFAULT 默认 NEVER 不加入 SQL
  188. insertStrategy: NOT_NULL
  189. # 字段验证策略之 update,在 update 的时候的字段验证策略
  190. updateStrategy: NOT_NULL
  191. # 字段验证策略之 select,在 select 的时候的字段验证策略既 wrapper 根据内部 entity 生成的 where 条件
  192. where-strategy: NOT_NULL
  193. # 数据加密
  194. mybatis-encryptor:
  195. # 是否开启加密
  196. enable: false
  197. # 默认加密算法
  198. algorithm: BASE64
  199. # 编码方式 BASE64/HEX。默认BASE64
  200. encode: BASE64
  201. # 安全秘钥 对称算法的秘钥 如:AES,SM4
  202. password:
  203. # 公私钥 非对称算法的公私钥 如:SM2,RSA
  204. publicKey:
  205. privateKey:
  206. # Swagger配置
  207. swagger:
  208. info:
  209. # 标题
  210. title: '标题:${ruoyi.name}多租户管理系统_接口文档'
  211. # 描述
  212. description: '描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...'
  213. # 版本
  214. version: '版本号: ${ruoyi.version}'
  215. # 作者信息
  216. contact:
  217. name: ageerle
  218. email: ageerle@163.com
  219. url: https://gitee.com/ageerle/ruoyi-ai
  220. components:
  221. # 鉴权方式配置
  222. security-schemes:
  223. apiKey:
  224. type: APIKEY
  225. in: HEADER
  226. name: ${sa-token.token-name}
  227. springdoc:
  228. api-docs:
  229. # 是否开启接口文档
  230. enabled: true
  231. swagger-ui:
  232. # 持久化认证数据
  233. persistAuthorization: true
  234. #这里定义了两个分组,可定义多个,也可以不定义
  235. group-configs:
  236. - group: 1.演示模块
  237. packages-to-scan: com.xmzs.demo
  238. - group: 2.通用模块
  239. packages-to-scan: com.xmzs.web
  240. - group: 3.系统模块
  241. packages-to-scan: com.xmzs.system
  242. - group: 4.代码生成模块
  243. packages-to-scan: com.xmzs.generator
  244. # 防止XSS攻击
  245. xss:
  246. # 过滤开关
  247. enabled: true
  248. # 排除链接(多个用逗号分隔)
  249. excludes: /system/notice
  250. # 匹配链接
  251. urlPatterns: /system/*,/monitor/*,/tool/*
  252. # 全局线程池相关配置
  253. thread-pool:
  254. # 是否开启线程池
  255. enabled: false
  256. # 队列最大长度
  257. queueCapacity: 128
  258. # 线程池维护线程所允许的空闲时间
  259. keepAliveSeconds: 300
  260. --- # 分布式锁 lock4j 全局配置
  261. lock4j:
  262. # 获取分布式锁超时时间,默认为 3000 毫秒
  263. acquire-timeout: 3000
  264. # 分布式锁的超时时间,默认为 30 秒
  265. expire: 30000
  266. --- # Actuator 监控端点的配置项
  267. management:
  268. endpoints:
  269. web:
  270. exposure:
  271. include: '*'
  272. endpoint:
  273. health:
  274. show-details: ALWAYS
  275. logfile:
  276. external-file: ./logs/sys-console.log
  277. --- # websocket
  278. websocket:
  279. enabled: false
  280. # 路径
  281. path: ''
  282. # 设置访问源地址
  283. allowedOrigins: '*'
  284. # 微信小程序配置信息
  285. wx:
  286. miniapp:
  287. configs:
  288. - appid: # 你的appid
  289. secret: # 你的secret
  290. token: #微信小程序消息服务器配置的token
  291. aesKey: #微信小程序消息服务器配置的EncodingAESKey
  292. msgDataFormat: JSON
  293. baidu:
  294. # 是否开启文本审核
  295. enabled: false
  296. # 文本审核
  297. textReview:
  298. apiKey: '' # apiKey
  299. secretKey: '' # secretKey
  300. appKey: xxxxxxxxxxxxxxxxx
  301. secretKey: xxxxxxxxxxxxxxxxxxxxxxx
  302. wechat:
  303. # 是否使用微信 true/false
  304. enable: true
  305. # 生成的登录二维码路径 默认与项目同级
  306. qrPath: "./"
  307. keyword:
  308. # 重置会话指令
  309. reset: "重置会话"
  310. # ai画图指令(DALL·E模型 https://platform.openai.com/docs/models/dall-e)
  311. # generation 根据关键词生成图片(https://platform.openai.com/docs/guides/images/generations)
  312. image: "ai画图"
  313. # ai语音指令(TTS模型 https://platform.openai.com/docs/api-reference/audio)
  314. audio: "ai语音"
  315. mj:
  316. api-secret: 'sk-xx'
  317. task-store:
  318. type: in_memory
  319. timeout: 30d
  320. translate-way: gpt
  321. # proxy:
  322. # host: 127.0.0.1
  323. # port: 10809
  324. ng-discord:
  325. server: 'https://xxx.pandarobot.chat/'
  326. cdn: 'https://xxx.pandarobot.chat/'
  327. wss: 'https://xxx.pandarobot.chat/'
  328. openai:
  329. gpt-api-url: 'https://api.pandarobot.chat/'
  330. gpt-api-key: 'sk-xx'
  331. accounts:
  332. - guild-id: 'xx'
  333. channel-id: 'xx'
  334. user-token: 'xx'
  335. --- # mail 邮件发送
  336. mail:
  337. enabled: true
  338. host: smtp.163.com
  339. port: 465
  340. # 是否需要用户名密码验证
  341. auth: true
  342. # 发送方,遵循RFC-822标准
  343. from: ageerle@163.com
  344. # 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
  345. user: ageerle@163.com
  346. # 密码(填写授权码)
  347. pass: TOGXBVPYFVPFRQMQ
  348. # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
  349. starttlsEnable: true
  350. # 使用SSL安全连接
  351. sslEnable: true
  352. # SMTP超时时长,单位毫秒,缺省值不超时
  353. timeout: 0
  354. # Socket连接超时值,单位毫秒,缺省值不超时
  355. connectionTimeout: 0
  356. # chatgpt配置信息
  357. chat:
  358. apiKey: 'sk-xxx'
  359. apiHost: 'https://api.pandarobot.chat/'
  360. # 支付配置信息
  361. pay:
  362. pid: 'xxx'
  363. key: 'xxx'
  364. payUrl: 'https://pay.pandarobot.chat/mapi.php'
  365. notify_url: 'https://www.pandarobot.chat/pay/returnUrl'
  366. return_url: 'https://www.pandarobot.chat/pay/notifyUrl'
  367. type: 'wxpay'
  368. device: 'pc'
  369. sign_type: 'MD5'