application.yml 10 KB

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