application.yml 10 KB

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