application.yml 11 KB

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