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