application.yml 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  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. # token配置
  91. token:
  92. # 令牌自定义标识
  93. header: Authorization
  94. # 令牌密钥
  95. secret: abcdefghijklmnopqrstuvwxyz
  96. # 令牌有效期(默认30分钟)
  97. expireTime: 30
  98. # security配置
  99. security:
  100. # 登出路径
  101. logout-url: /logout
  102. # 匿名路径
  103. anonymous:
  104. - /login
  105. - /register
  106. - /captchaImage
  107. # swagger 文档配置
  108. - /doc.html
  109. - /swagger-resources/**
  110. - /webjars/**
  111. - /*/api-docs
  112. # druid 监控配置
  113. - /druid/**
  114. # actuator 监控配置
  115. - /actuator
  116. - /actuator/**
  117. # 用户放行
  118. permit-all:
  119. # 重复提交
  120. repeat-submit:
  121. # 全局间隔时间(毫秒)
  122. interval: 5000
  123. # MyBatisPlus配置
  124. # https://baomidou.com/config/
  125. mybatis-plus:
  126. # 不支持多包, 如有需要可在注解配置 或 提升扫包等级
  127. # 例如 com.**.**.mapper
  128. mapperPackage: com.ruoyi.**.mapper
  129. # 对应的 XML 文件位置
  130. mapperLocations: classpath*:mapper/**/*Mapper.xml
  131. # 实体扫描,多个package用逗号或者分号分隔
  132. typeAliasesPackage: com.ruoyi.**.domain
  133. # 启动时是否检查 MyBatis XML 文件的存在,默认不检查
  134. checkConfigLocation: false
  135. # 通过该属性可指定 MyBatis 的执行器,MyBatis 的执行器总共有三种:
  136. # SIMPLE:每个语句创建新的预处理器 REUSE:会复用预处理器 BATCH:批量执行所有的更新
  137. executorType: SIMPLE
  138. configuration:
  139. # 自动驼峰命名规则(camel case)映射
  140. mapUnderscoreToCamelCase: true
  141. # 当设置为 true 的时候,懒加载的对象可能被任何懒属性全部加载,否则,每个属性都按需加载。需要和 lazyLoadingEnabled 一起使用。
  142. aggressiveLazyLoading: true
  143. # MyBatis 自动映射策略
  144. # NONE:不启用 PARTIAL:只对非嵌套 resultMap 自动映射 FULL:对所有 resultMap 自动映射
  145. autoMappingBehavior: PARTIAL
  146. # MyBatis 自动映射时未知列或未知属性处理策
  147. # NONE:不做处理 WARNING:打印相关警告 FAILING:抛出异常和详细信息
  148. autoMappingUnknownColumnBehavior: NONE
  149. # Mybatis一级缓存,默认为 SESSION
  150. # SESSION session级别缓存 STATEMENT 关闭一级缓存
  151. localCacheScope: SESSION
  152. # 开启Mybatis二级缓存,默认为 true
  153. cacheEnabled: false
  154. # 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl
  155. # 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl
  156. # 默认日志输出 org.apache.ibatis.logging.slf4j.Slf4jImpl
  157. logImpl: org.apache.ibatis.logging.nologging.NoLoggingImpl
  158. global-config:
  159. # 是否打印 Logo banner
  160. banner: true
  161. # 是否初始化 SqlRunner
  162. enableSqlRunner: false
  163. dbConfig:
  164. # 主键类型
  165. # AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
  166. idType: AUTO
  167. # 表名是否使用驼峰转下划线命名,只对表名生效
  168. tableUnderline: true
  169. # 大写命名,对表名和字段名均生效
  170. capitalMode: false
  171. # 逻辑已删除值
  172. logicDeleteValue: 2
  173. # 逻辑未删除值
  174. logicNotDeleteValue: 0
  175. # 字段验证策略之 insert,在 insert 的时候的字段验证策略
  176. # IGNORED 忽略 NOT_NULL 非NULL NOT_EMPTY 非空 DEFAULT 默认 NEVER 不加入 SQL
  177. insertStrategy: NOT_NULL
  178. # 字段验证策略之 update,在 update 的时候的字段验证策略
  179. updateStrategy: NOT_NULL
  180. # 字段验证策略之 select,在 select 的时候的字段验证策略既 wrapper 根据内部 entity 生成的 where 条件
  181. where-strategy: NOT_NULL
  182. # Swagger配置
  183. swagger:
  184. # 是否开启swagger
  185. enabled: true
  186. # 请求前缀
  187. pathMapping: /dev-api
  188. # 标题
  189. title: '标题:${ruoyi.name}后台管理系统_接口文档'
  190. # 描述
  191. description: '描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...'
  192. # 版本
  193. version: '版本号: ${ruoyi-vue-plus.version}'
  194. # 作者信息
  195. contact:
  196. name: Lion Li
  197. email: crazylionli@163.com
  198. url: https://gitee.com/JavaLionLi/RuoYi-Vue-Plus
  199. groups:
  200. - name: 1.演示案例
  201. basePackage: com.ruoyi.demo
  202. - name: 2.系统模块
  203. basePackage: com.ruoyi.web
  204. - name: 3.代码生成模块
  205. basePackage: com.ruoyi.generator
  206. # 防止XSS攻击
  207. xss:
  208. # 过滤开关
  209. enabled: true
  210. # 排除链接(多个用逗号分隔)
  211. excludes: /system/notice
  212. # 匹配链接
  213. urlPatterns: /system/*,/monitor/*,/tool/*
  214. # 全局线程池相关配置
  215. thread-pool:
  216. # 是否开启线程池
  217. enabled: false
  218. # 核心线程池大小
  219. corePoolSize: 8
  220. # 最大可创建的线程数
  221. maxPoolSize: 16
  222. # 队列最大长度
  223. queueCapacity: 128
  224. # 线程池维护线程所允许的空闲时间
  225. keepAliveSeconds: 300
  226. # 线程池对拒绝任务(无线程可用)的处理策略
  227. # CALLER_RUNS_POLICY 调用方执行
  228. # DISCARD_OLDEST_POLICY 放弃最旧的
  229. # DISCARD_POLICY 丢弃
  230. # ABORT_POLICY 中止
  231. rejectedExecutionHandler: CALLER_RUNS_POLICY
  232. # feign 相关配置
  233. feign:
  234. # 不支持多包, 如有需要可在注解配置 或 提升扫包等级
  235. # 例如 com.**.**.feign
  236. package: com.ruoyi.**.feign
  237. # 开启压缩
  238. compression:
  239. request:
  240. enabled: true
  241. response:
  242. enabled: true
  243. okhttp:
  244. enabled: true
  245. circuitbreaker:
  246. enabled: true
  247. --- # redisson 缓存配置
  248. redisson:
  249. cacheGroup:
  250. # 用例: @Cacheable(cacheNames="groupId", key="#XXX") 方可使用缓存组配置
  251. - groupId: redissonCacheMap
  252. # 组过期时间(脚本监控)
  253. ttl: 60000
  254. # 组最大空闲时间(脚本监控)
  255. maxIdleTime: 60000
  256. # 组最大长度
  257. maxSize: 0
  258. - groupId: testCache
  259. ttl: 1000
  260. maxIdleTime: 500
  261. --- # 分布式锁 lock4j 全局配置
  262. lock4j:
  263. # 获取分布式锁超时时间,默认为 3000 毫秒
  264. acquire-timeout: 3000
  265. # 分布式锁的超时时间,默认为 30 毫秒
  266. expire: 30000
  267. --- # Actuator 监控端点的配置项
  268. management:
  269. endpoints:
  270. web:
  271. # Actuator 提供的 API 接口的根目录。默认为 /actuator
  272. base-path: /actuator
  273. exposure:
  274. # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
  275. # 生产环境不建议放开所有 根据项目需求放开即可
  276. include: @endpoints.include@
  277. endpoint:
  278. logfile:
  279. external-file: ./logs/sys-console.log
  280. --- # 定时任务配置
  281. spring:
  282. quartz:
  283. scheduler-name: RuoyiScheduler
  284. startup-delay: 1s
  285. overwrite-existing-jobs: true
  286. auto-startup: true
  287. job-store-type: jdbc
  288. properties:
  289. org:
  290. quartz:
  291. # Scheduler 相关配置
  292. scheduler:
  293. instanceName: RuoyiScheduler
  294. instanceId: AUTO
  295. # 线程池相关配置
  296. threadPool:
  297. class: org.quartz.simpl.SimpleThreadPool
  298. threadCount: 20
  299. threadPriority: 5
  300. # JobStore 集群配置
  301. jobStore:
  302. class: org.quartz.impl.jdbcjobstore.JobStoreTX
  303. isClustered: true
  304. clusterCheckinInterval: 15000
  305. txIsolationLevelSerializable: true
  306. misfireThreshold: 60000
  307. tablePrefix: QRTZ_
  308. # sqlserver 启用
  309. # selectWithLockSQL: SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?