application.yml 10 KB

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