application.yml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. # 项目相关配置
  2. ruoyi:
  3. # 名称
  4. name: RuoYi-Vue-Plus
  5. # 版本
  6. version: ${ruoyi-vue-plus.version}
  7. # 版权年份
  8. copyrightYear: 2021
  9. # 实例演示开关
  10. demoEnabled: true
  11. # 获取ip地址开关
  12. addressEnabled: true
  13. captcha:
  14. # 页面 <参数设置> 可开启关闭 验证码校验
  15. # 验证码类型 math 数组计算 char 字符验证
  16. type: MATH
  17. # line 线段干扰 circle 圆圈干扰 shear 扭曲干扰
  18. category: CIRCLE
  19. # 数字验证码位数
  20. numberLength: 1
  21. # 字符验证码长度
  22. charLength: 4
  23. # 开发环境配置
  24. server:
  25. # 服务器的HTTP端口,默认为8080
  26. port: 8080
  27. servlet:
  28. # 应用的访问路径
  29. context-path: /
  30. # undertow 配置
  31. undertow:
  32. # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
  33. max-http-post-size: -1
  34. # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
  35. # 每块buffer的空间大小,越小的空间被利用越充分
  36. buffer-size: 512
  37. # 是否分配的直接内存
  38. direct-buffers: true
  39. threads:
  40. # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
  41. io: 8
  42. # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
  43. worker: 256
  44. # 日志配置
  45. logging:
  46. level:
  47. com.ruoyi: @logging.level@
  48. org.springframework: warn
  49. config: classpath:logback.xml
  50. # tlog 全局访问性能拦截
  51. tlog:
  52. enable-invoke-time-print: true
  53. # Spring配置
  54. spring:
  55. application:
  56. name: ${ruoyi.name}
  57. # 资源信息
  58. messages:
  59. # 国际化资源文件路径
  60. basename: i18n/messages
  61. profiles:
  62. active: @profiles.active@
  63. # 文件上传
  64. servlet:
  65. multipart:
  66. # 单个文件大小
  67. max-file-size: 10MB
  68. # 设置总上传的文件大小
  69. max-request-size: 20MB
  70. # 服务模块
  71. devtools:
  72. restart:
  73. # 热部署开关
  74. enabled: true
  75. # 与vue整合部署使用
  76. thymeleaf:
  77. # 将系统模板放置到最前面 否则会与 springboot-admin 页面冲突
  78. template-resolver-order: 1
  79. jackson:
  80. # 日期格式化
  81. date-format: yyyy-MM-dd HH:mm:ss
  82. serialization:
  83. # 格式化输出
  84. indent_output: false
  85. # 忽略无法转换的对象
  86. fail_on_empty_beans: false
  87. deserialization:
  88. # 允许对象忽略json中不存在的属性
  89. fail_on_unknown_properties: false
  90. # Sa-Token配置
  91. sa-token:
  92. # token名称 (同时也是cookie名称)
  93. token-name: Authorization
  94. # token有效期,单位s 默认30天, -1代表永不过期
  95. timeout: 2592000
  96. # token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
  97. activity-timeout: 1800
  98. # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
  99. is-concurrent: true
  100. # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
  101. is-share: false
  102. # 是否尝试从请求体里读取token
  103. is-read-body: false
  104. # 是否尝试从header里读取token
  105. is-read-head: true
  106. # 是否尝试从cookie里读取token
  107. is-read-cookie: false
  108. # token前缀
  109. token-prefix: "Bearer"
  110. # token风格
  111. token-style: uuid
  112. # jwt秘钥
  113. jwt-secret-key: abcdefghijklmnopqrstuvwxyz
  114. # 是否输出操作日志
  115. is-log: true
  116. # security配置
  117. security:
  118. # 排除路径
  119. excludes:
  120. - /login
  121. - /logout
  122. - /register
  123. - /captchaImage
  124. # 静态资源
  125. - /*.html
  126. - /**/*.html
  127. - /**/*.css
  128. - /**/*.js
  129. # swagger 文档配置
  130. - /doc.html
  131. - /swagger-resources/**
  132. - /webjars/**
  133. - /*/api-docs
  134. # druid 监控配置
  135. - /druid/**
  136. # actuator 监控配置
  137. - /actuator
  138. - /actuator/**
  139. # 重复提交
  140. repeat-submit:
  141. # 全局间隔时间(毫秒)
  142. interval: 5000
  143. # MyBatisPlus配置
  144. # https://baomidou.com/config/
  145. mybatis-plus:
  146. # 不支持多包, 如有需要可在注解配置 或 提升扫包等级
  147. # 例如 com.**.**.mapper
  148. mapperPackage: com.ruoyi.**.mapper
  149. # 对应的 XML 文件位置
  150. mapperLocations: classpath*:mapper/**/*Mapper.xml
  151. # 实体扫描,多个package用逗号或者分号分隔
  152. typeAliasesPackage: com.ruoyi.**.domain
  153. # 启动时是否检查 MyBatis XML 文件的存在,默认不检查
  154. checkConfigLocation: false
  155. # 通过该属性可指定 MyBatis 的执行器,MyBatis 的执行器总共有三种:
  156. # SIMPLE:每个语句创建新的预处理器 REUSE:会复用预处理器 BATCH:批量执行所有的更新
  157. executorType: SIMPLE
  158. configuration:
  159. # 自动驼峰命名规则(camel case)映射
  160. mapUnderscoreToCamelCase: true
  161. # 当设置为 true 的时候,懒加载的对象可能被任何懒属性全部加载,否则,每个属性都按需加载。需要和 lazyLoadingEnabled 一起使用。
  162. aggressiveLazyLoading: true
  163. # MyBatis 自动映射策略
  164. # NONE:不启用 PARTIAL:只对非嵌套 resultMap 自动映射 FULL:对所有 resultMap 自动映射
  165. autoMappingBehavior: PARTIAL
  166. # MyBatis 自动映射时未知列或未知属性处理策
  167. # NONE:不做处理 WARNING:打印相关警告 FAILING:抛出异常和详细信息
  168. autoMappingUnknownColumnBehavior: NONE
  169. # Mybatis一级缓存,默认为 SESSION
  170. # SESSION session级别缓存 STATEMENT 关闭一级缓存
  171. localCacheScope: SESSION
  172. # 开启Mybatis二级缓存,默认为 true
  173. cacheEnabled: false
  174. # 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl
  175. # 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl
  176. # 默认日志输出 org.apache.ibatis.logging.slf4j.Slf4jImpl
  177. logImpl: org.apache.ibatis.logging.nologging.NoLoggingImpl
  178. global-config:
  179. # 是否打印 Logo banner
  180. banner: true
  181. # 是否初始化 SqlRunner
  182. enableSqlRunner: false
  183. dbConfig:
  184. # 主键类型
  185. # AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
  186. idType: AUTO
  187. # 表名是否使用驼峰转下划线命名,只对表名生效
  188. tableUnderline: true
  189. # 大写命名,对表名和字段名均生效
  190. capitalMode: false
  191. # 逻辑已删除值
  192. logicDeleteValue: 2
  193. # 逻辑未删除值
  194. logicNotDeleteValue: 0
  195. # 字段验证策略之 insert,在 insert 的时候的字段验证策略
  196. # IGNORED 忽略 NOT_NULL 非NULL NOT_EMPTY 非空 DEFAULT 默认 NEVER 不加入 SQL
  197. insertStrategy: NOT_NULL
  198. # 字段验证策略之 update,在 update 的时候的字段验证策略
  199. updateStrategy: NOT_NULL
  200. # 字段验证策略之 select,在 select 的时候的字段验证策略既 wrapper 根据内部 entity 生成的 where 条件
  201. where-strategy: NOT_NULL
  202. # Swagger配置
  203. swagger:
  204. # 是否开启swagger
  205. enabled: true
  206. # 请求前缀
  207. pathMapping: /dev-api
  208. # 标题
  209. title: '标题:${ruoyi.name}后台管理系统_接口文档'
  210. # 描述
  211. description: '描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...'
  212. # 版本
  213. version: '版本号: ${ruoyi-vue-plus.version}'
  214. # 作者信息
  215. contact:
  216. name: Lion Li
  217. email: crazylionli@163.com
  218. url: https://gitee.com/JavaLionLi/RuoYi-Vue-Plus
  219. groups:
  220. - name: 1.演示案例
  221. basePackage: com.ruoyi.demo
  222. - name: 2.系统模块
  223. basePackage: com.ruoyi.web
  224. - name: 3.代码生成模块
  225. basePackage: com.ruoyi.generator
  226. # 防止XSS攻击
  227. xss:
  228. # 过滤开关
  229. enabled: true
  230. # 排除链接(多个用逗号分隔)
  231. excludes: /system/notice
  232. # 匹配链接
  233. urlPatterns: /system/*,/monitor/*,/tool/*
  234. # 全局线程池相关配置
  235. thread-pool:
  236. # 是否开启线程池
  237. enabled: false
  238. # 核心线程池大小
  239. corePoolSize: 8
  240. # 最大可创建的线程数
  241. maxPoolSize: 16
  242. # 队列最大长度
  243. queueCapacity: 128
  244. # 线程池维护线程所允许的空闲时间
  245. keepAliveSeconds: 300
  246. # 线程池对拒绝任务(无线程可用)的处理策略
  247. # CALLER_RUNS_POLICY 调用方执行
  248. # DISCARD_OLDEST_POLICY 放弃最旧的
  249. # DISCARD_POLICY 丢弃
  250. # ABORT_POLICY 中止
  251. rejectedExecutionHandler: CALLER_RUNS_POLICY
  252. # feign 相关配置
  253. feign:
  254. # 不支持多包, 如有需要可在注解配置 或 提升扫包等级
  255. # 例如 com.**.**.feign
  256. package: com.ruoyi.**.feign
  257. # 开启压缩
  258. compression:
  259. request:
  260. enabled: true
  261. response:
  262. enabled: true
  263. okhttp:
  264. enabled: true
  265. circuitbreaker:
  266. enabled: true
  267. --- # redisson 缓存配置
  268. redisson:
  269. cacheGroup:
  270. # 用例: @Cacheable(cacheNames="groupId", key="#XXX") 方可使用缓存组配置
  271. - groupId: redissonCacheMap
  272. # 组过期时间(脚本监控)
  273. ttl: 60000
  274. # 组最大空闲时间(脚本监控)
  275. maxIdleTime: 60000
  276. # 组最大长度
  277. maxSize: 0
  278. - groupId: testCache
  279. ttl: 1000
  280. maxIdleTime: 500
  281. --- # 分布式锁 lock4j 全局配置
  282. lock4j:
  283. # 获取分布式锁超时时间,默认为 3000 毫秒
  284. acquire-timeout: 3000
  285. # 分布式锁的超时时间,默认为 30 毫秒
  286. expire: 30000
  287. --- # Actuator 监控端点的配置项
  288. management:
  289. endpoints:
  290. web:
  291. # Actuator 提供的 API 接口的根目录。默认为 /actuator
  292. base-path: /actuator
  293. exposure:
  294. # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
  295. # 生产环境不建议放开所有 根据项目需求放开即可
  296. include: @endpoints.include@
  297. endpoint:
  298. logfile:
  299. external-file: ./logs/sys-console.log
  300. --- # 定时任务配置
  301. spring:
  302. quartz:
  303. scheduler-name: RuoyiScheduler
  304. startup-delay: 1s
  305. overwrite-existing-jobs: true
  306. auto-startup: true
  307. job-store-type: jdbc
  308. properties:
  309. org:
  310. quartz:
  311. # Scheduler 相关配置
  312. scheduler:
  313. instanceName: RuoyiScheduler
  314. instanceId: AUTO
  315. # 线程池相关配置
  316. threadPool:
  317. class: org.quartz.simpl.SimpleThreadPool
  318. threadCount: 20
  319. threadPriority: 5
  320. # JobStore 集群配置
  321. jobStore:
  322. class: org.quartz.impl.jdbcjobstore.JobStoreTX
  323. isClustered: true
  324. clusterCheckinInterval: 15000
  325. txIsolationLevelSerializable: true
  326. misfireThreshold: 60000
  327. tablePrefix: QRTZ_
  328. # sqlserver 启用
  329. # selectWithLockSQL: SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?