application.yml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. server:
  2. # undertow 配置
  3. undertow:
  4. # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
  5. max-http-post-size: -1
  6. # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
  7. # 每块buffer的空间大小,越小的空间被利用越充分
  8. buffer-size: 512
  9. # 是否分配的直接内存
  10. direct-buffers: true
  11. threads:
  12. # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
  13. io: 8
  14. # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
  15. worker: 256
  16. dubbo:
  17. application:
  18. logger: slf4j
  19. protocol:
  20. # 使用dubbo协议通信
  21. name: dubbo
  22. # dubbo 协议端口(-1表示自增端口,从20880开始)
  23. port: -1
  24. # 注册中心配置
  25. registry:
  26. address: nacos://${spring.cloud.nacos.server-addr}
  27. group: DUBBO_GROUP
  28. # 消费者相关配置
  29. consumer:
  30. # 结果缓存(LRU算法)
  31. cache: true
  32. # 支持校验注解
  33. validation: true
  34. # 超时时间
  35. timeout: 3000
  36. # 初始化检查
  37. check: false
  38. scan:
  39. # 接口实现类扫描
  40. base-packages: com.ruoyi.**.dubbo
  41. # 自定义配置
  42. custom:
  43. # 全局请求log
  44. request-log: true
  45. spring:
  46. main:
  47. allow-bean-definition-overriding: true
  48. #jackson配置
  49. jackson:
  50. # 日期格式化
  51. date-format: yyyy-MM-dd HH:mm:ss
  52. serialization:
  53. # 格式化输出
  54. indent_output: false
  55. # 忽略无法转换的对象
  56. fail_on_empty_beans: false
  57. deserialization:
  58. # 允许对象忽略json中不存在的属性
  59. fail_on_unknown_properties: false
  60. cloud:
  61. # 网关配置
  62. gateway:
  63. discovery:
  64. locator:
  65. lowerCaseServiceId: true
  66. enabled: true
  67. routes:
  68. # 认证中心
  69. - id: ruoyi-auth
  70. uri: lb://ruoyi-auth
  71. predicates:
  72. - Path=/auth/**
  73. filters:
  74. # 验证码处理
  75. - CacheRequestFilter
  76. - ValidateCodeFilter
  77. - StripPrefix=1
  78. # 代码生成
  79. - id: ruoyi-gen
  80. uri: lb://ruoyi-gen
  81. predicates:
  82. - Path=/code/**
  83. filters:
  84. - StripPrefix=1
  85. # 定时任务
  86. - id: ruoyi-job
  87. uri: lb://ruoyi-job
  88. predicates:
  89. - Path=/schedule/**
  90. filters:
  91. - StripPrefix=1
  92. # 系统模块
  93. - id: ruoyi-system
  94. uri: lb://ruoyi-system
  95. predicates:
  96. - Path=/system/**
  97. filters:
  98. - StripPrefix=1
  99. # 文件服务
  100. - id: ruoyi-file
  101. uri: lb://ruoyi-file
  102. predicates:
  103. - Path=/file/**
  104. filters:
  105. - StripPrefix=1
  106. # 安全配置
  107. security:
  108. # 验证码
  109. captcha:
  110. # 是否开启验证码
  111. enabled: true
  112. # 验证码类型 math 数组计算 char 字符验证
  113. type: MATH
  114. # line 线段干扰 circle 圆圈干扰 shear 扭曲干扰
  115. category: CIRCLE
  116. # 数字验证码位数
  117. numberLength: 1
  118. # 字符验证码长度
  119. charLength: 4
  120. # 防止XSS攻击
  121. xss:
  122. enabled: true
  123. excludeUrls:
  124. - /system/notice
  125. # 不校验白名单
  126. ignore:
  127. whites:
  128. - /auth/logout
  129. - /auth/login
  130. - /auth/register
  131. - /*/v2/api-docs
  132. - /csrf
  133. # 暴露监控端点
  134. management:
  135. endpoints:
  136. web:
  137. exposure:
  138. include: '*'
  139. endpoint:
  140. logfile:
  141. external-file: ./logs/${spring.application.name}/console.log
  142. # 日志配置
  143. logging:
  144. level:
  145. org.springframework: warn
  146. org.apache.dubbo: warn
  147. com.alibaba.nacos: warn
  148. config: classpath:logback.xml
  149. # redisson 缓存配置
  150. redisson:
  151. cacheGroup:
  152. # 用例: @Cacheable(cacheNames="groupId", key="#XXX") 方可使用缓存组配置
  153. - groupId: redissonCacheMap
  154. # 组过期时间(脚本监控)
  155. ttl: 60000
  156. # 组最大空闲时间(脚本监控)
  157. maxIdleTime: 60000
  158. # 组最大长度
  159. maxSize: 0
  160. # 分布式锁 lock4j 全局配置
  161. lock4j:
  162. # 获取分布式锁超时时间,默认为 3000 毫秒
  163. acquire-timeout: 3000
  164. # 分布式锁的超时时间,默认为 30 毫秒
  165. expire: 30000
  166. # mybatis配置
  167. mybatis:
  168. # 搜索指定包别名
  169. typeAliasesPackage: com.ruoyi.**.domain
  170. # 配置mapper的扫描,找到所有的mapper.xml映射文件
  171. mapperLocations: classpath:mapper/**/*.xml
  172. # swagger配置
  173. swagger:
  174. license: Powered By ruoyi
  175. licenseUrl: https://ruoyi.vip