application.yml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  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. # 缓存懒加载
  14. cacheLazy: false
  15. captcha:
  16. # 页面 <参数设置> 可开启关闭 验证码校验
  17. # 验证码类型 math 数组计算 char 字符验证
  18. type: MATH
  19. # line 线段干扰 circle 圆圈干扰 shear 扭曲干扰
  20. category: CIRCLE
  21. # 数字验证码位数
  22. numberLength: 1
  23. # 字符验证码长度
  24. charLength: 4
  25. # 开发环境配置
  26. server:
  27. # 服务器的HTTP端口,默认为8080
  28. port: 8080
  29. servlet:
  30. # 应用的访问路径
  31. context-path: /
  32. # undertow 配置
  33. undertow:
  34. # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
  35. max-http-post-size: -1
  36. # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
  37. # 每块buffer的空间大小,越小的空间被利用越充分
  38. buffer-size: 512
  39. # 是否分配的直接内存
  40. direct-buffers: true
  41. threads:
  42. # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
  43. io: 8
  44. # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
  45. worker: 256
  46. # 日志配置
  47. logging:
  48. level:
  49. com.ruoyi: @logging.level@
  50. org.springframework: warn
  51. config: classpath:logback.xml
  52. # Spring配置
  53. spring:
  54. application:
  55. name: ${ruoyi.name}
  56. # 资源信息
  57. messages:
  58. # 国际化资源文件路径
  59. basename: i18n/messages
  60. profiles:
  61. active: @profiles.active@
  62. # 文件上传
  63. servlet:
  64. multipart:
  65. # 单个文件大小
  66. max-file-size: 10MB
  67. # 设置总上传的文件大小
  68. max-request-size: 20MB
  69. # 服务模块
  70. devtools:
  71. restart:
  72. # 热部署开关
  73. enabled: true
  74. # 与vue整合部署使用
  75. thymeleaf:
  76. # 将系统模板放置到最前面 否则会与 springboot-admin 页面冲突
  77. template-resolver-order: 1
  78. jackson:
  79. # 日期格式化
  80. date-format: yyyy-MM-dd HH:mm:ss
  81. serialization:
  82. # 格式化输出
  83. indent_output: false
  84. # 忽略无法转换的对象
  85. fail_on_empty_beans: false
  86. deserialization:
  87. # 允许对象忽略json中不存在的属性
  88. fail_on_unknown_properties: false
  89. # token配置
  90. token:
  91. # 令牌自定义标识
  92. header: Authorization
  93. # 令牌密钥
  94. secret: abcdefghijklmnopqrstuvwxyz
  95. # 令牌有效期(默认30分钟)
  96. expireTime: 30
  97. # security配置
  98. security:
  99. # 登出路径
  100. logout-url: /logout
  101. # 匿名路径
  102. anonymous:
  103. - /login
  104. - /register
  105. - /captchaImage
  106. # swagger 文档配置
  107. - /doc.html
  108. - /swagger-resources/**
  109. - /webjars/**
  110. - /*/api-docs
  111. # druid 监控配置
  112. - /druid/**
  113. # 用户放行
  114. permit-all:
  115. # actuator 监控配置
  116. - /actuator
  117. - /actuator/**
  118. # 重复提交
  119. repeat-submit:
  120. # 全局间隔时间(毫秒)
  121. interval: 5000
  122. # MyBatisPlus配置
  123. # https://baomidou.com/config/
  124. mybatis-plus:
  125. # 不支持多包, 如有需要可在注解配置 或 提升扫包等级
  126. # 例如 com.**.**.mapper
  127. mapperPackage: com.ruoyi.**.mapper
  128. # 对应的 XML 文件位置
  129. mapperLocations: classpath*:mapper/**/*Mapper.xml
  130. # 实体扫描,多个package用逗号或者分号分隔
  131. typeAliasesPackage: com.ruoyi.**.domain
  132. # 启动时是否检查 MyBatis XML 文件的存在,默认不检查
  133. checkConfigLocation: false
  134. # 通过该属性可指定 MyBatis 的执行器,MyBatis 的执行器总共有三种:
  135. # SIMPLE:每个语句创建新的预处理器 REUSE:会复用预处理器 BATCH:批量执行所有的更新
  136. executorType: SIMPLE
  137. configuration:
  138. # 自动驼峰命名规则(camel case)映射
  139. mapUnderscoreToCamelCase: true
  140. # 当设置为 true 的时候,懒加载的对象可能被任何懒属性全部加载,否则,每个属性都按需加载。需要和 lazyLoadingEnabled 一起使用。
  141. aggressiveLazyLoading: true
  142. # MyBatis 自动映射策略
  143. # NONE:不启用 PARTIAL:只对非嵌套 resultMap 自动映射 FULL:对所有 resultMap 自动映射
  144. autoMappingBehavior: PARTIAL
  145. # MyBatis 自动映射时未知列或未知属性处理策
  146. # NONE:不做处理 WARNING:打印相关警告 FAILING:抛出异常和详细信息
  147. autoMappingUnknownColumnBehavior: NONE
  148. # Mybatis一级缓存,默认为 SESSION
  149. # SESSION session级别缓存 STATEMENT 关闭一级缓存
  150. localCacheScope: SESSION
  151. # 开启Mybatis二级缓存,默认为 true
  152. cacheEnabled: false
  153. # 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl
  154. # 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl
  155. # 默认日志输出 org.apache.ibatis.logging.slf4j.Slf4jImpl
  156. logImpl: org.apache.ibatis.logging.nologging.NoLoggingImpl
  157. global-config:
  158. # 是否打印 Logo banner
  159. banner: true
  160. # 是否初始化 SqlRunner
  161. enableSqlRunner: false
  162. dbConfig:
  163. # 主键类型
  164. # AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
  165. idType: AUTO
  166. # 表名是否使用驼峰转下划线命名,只对表名生效
  167. tableUnderline: true
  168. # 大写命名,对表名和字段名均生效
  169. capitalMode: false
  170. # 逻辑已删除值
  171. logicDeleteValue: 2
  172. # 逻辑未删除值
  173. logicNotDeleteValue: 0
  174. # 字段验证策略之 insert,在 insert 的时候的字段验证策略
  175. # IGNORED 忽略 NOT_NULL 非NULL NOT_EMPTY 非空 DEFAULT 默认 NEVER 不加入 SQL
  176. insertStrategy: NOT_NULL
  177. # 字段验证策略之 update,在 update 的时候的字段验证策略
  178. updateStrategy: NOT_NULL
  179. # 字段验证策略之 select,在 select 的时候的字段验证策略既 wrapper 根据内部 entity 生成的 where 条件
  180. where-strategy: NOT_NULL
  181. # Swagger配置
  182. swagger:
  183. # 是否开启swagger
  184. enabled: true
  185. # 请求前缀
  186. pathMapping: /dev-api
  187. # 标题
  188. title: '标题:${ruoyi.name}后台管理系统_接口文档'
  189. # 描述
  190. description: '描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...'
  191. # 版本
  192. version: '版本号: ${ruoyi-vue-plus.version}'
  193. # 作者信息
  194. contact:
  195. name: Lion Li
  196. email: crazylionli@163.com
  197. url: https://gitee.com/JavaLionLi/RuoYi-Vue-Plus
  198. groups:
  199. - name: 1.演示案例
  200. basePackage: com.ruoyi.demo
  201. - name: 2.系统模块
  202. basePackage: com.ruoyi.web
  203. - name: 3.代码生成模块
  204. basePackage: com.ruoyi.generator
  205. knife4j:
  206. # 是否开启Knife4j增强模式
  207. enable: true
  208. # 是否开启生产环境保护策略
  209. production: @knife4j.production@
  210. basic:
  211. enable: true
  212. username: ruoyi
  213. password: 123456
  214. # 前端Ui的个性化配置属性
  215. setting:
  216. # 默认语言
  217. language: zh-CN
  218. # 是否显示Footer
  219. enableFooter: false
  220. # 是否开启动态参数调试功能
  221. enableDynamicParameter: true
  222. # 是否在每个Debug调试栏后显示刷新变量按钮
  223. enableReloadCacheParameter: true
  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. --- # redisson 缓存配置
  251. redisson:
  252. cacheGroup:
  253. # 用例: @Cacheable(cacheNames="groupId", key="#XXX") 方可使用缓存组配置
  254. - groupId: redissonCacheMap
  255. # 组过期时间(脚本监控)
  256. ttl: 60000
  257. # 组最大空闲时间(脚本监控)
  258. maxIdleTime: 60000
  259. # 组最大长度
  260. maxSize: 0
  261. - groupId: testCache
  262. ttl: 1000
  263. maxIdleTime: 500
  264. --- # 分布式锁 lock4j 全局配置
  265. lock4j:
  266. # 获取分布式锁超时时间,默认为 3000 毫秒
  267. acquire-timeout: 3000
  268. # 分布式锁的超时时间,默认为 30 毫秒
  269. expire: 30000
  270. --- # Actuator 监控端点的配置项
  271. management:
  272. endpoints:
  273. web:
  274. # Actuator 提供的 API 接口的根目录。默认为 /actuator
  275. base-path: /actuator
  276. exposure:
  277. # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
  278. # 生产环境不建议放开所有 根据项目需求放开即可
  279. include: @endpoints.include@
  280. endpoint:
  281. logfile:
  282. external-file: ./logs/sys-console.log