application.yml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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. # 挂载到 Spring Cloud 注册中心
  25. registry:
  26. address: nacos://${spring.cloud.nacos.server-addr}
  27. group: DUBBO_GROUP
  28. consumer:
  29. cache: true
  30. validation: true
  31. timeout: 3000
  32. check: false
  33. scan:
  34. base-packages: com.ruoyi.**.dubbo
  35. cloud:
  36. subscribed-services: ${dubbo.application.name}
  37. spring:
  38. main:
  39. allow-bean-definition-overriding: true
  40. #jackson配置
  41. jackson:
  42. # 日期格式化
  43. date-format: yyyy-MM-dd HH:mm:ss
  44. serialization:
  45. # 格式化输出
  46. indent_output: false
  47. # 忽略无法转换的对象
  48. fail_on_empty_beans: false
  49. deserialization:
  50. # 允许对象忽略json中不存在的属性
  51. fail_on_unknown_properties: false
  52. cloud:
  53. # 网关配置
  54. gateway:
  55. discovery:
  56. locator:
  57. lowerCaseServiceId: true
  58. enabled: true
  59. routes:
  60. # 认证中心
  61. - id: ruoyi-auth
  62. uri: lb://ruoyi-auth
  63. predicates:
  64. - Path=/auth/**
  65. filters:
  66. # 验证码处理
  67. - CacheRequestFilter
  68. - ValidateCodeFilter
  69. - StripPrefix=1
  70. # 代码生成
  71. - id: ruoyi-gen
  72. uri: lb://ruoyi-gen
  73. predicates:
  74. - Path=/code/**
  75. filters:
  76. - StripPrefix=1
  77. # 定时任务
  78. - id: ruoyi-job
  79. uri: lb://ruoyi-job
  80. predicates:
  81. - Path=/schedule/**
  82. filters:
  83. - StripPrefix=1
  84. # 系统模块
  85. - id: ruoyi-system
  86. uri: lb://ruoyi-system
  87. predicates:
  88. - Path=/system/**
  89. filters:
  90. - StripPrefix=1
  91. # 文件服务
  92. - id: ruoyi-file
  93. uri: lb://ruoyi-file
  94. predicates:
  95. - Path=/file/**
  96. filters:
  97. - StripPrefix=1
  98. # 安全配置
  99. security:
  100. # 验证码
  101. captcha:
  102. # 是否开启验证码
  103. enabled: true
  104. # 验证码类型 math 数组计算 char 字符验证
  105. type: MATH
  106. # line 线段干扰 circle 圆圈干扰 shear 扭曲干扰
  107. category: CIRCLE
  108. # 数字验证码位数
  109. numberLength: 1
  110. # 字符验证码长度
  111. charLength: 4
  112. # 防止XSS攻击
  113. xss:
  114. enabled: true
  115. excludeUrls:
  116. - /system/notice
  117. # 不校验白名单
  118. ignore:
  119. whites:
  120. - /auth/logout
  121. - /auth/login
  122. - /auth/register
  123. - /*/v2/api-docs
  124. - /csrf
  125. # 暴露监控端点
  126. management:
  127. endpoints:
  128. web:
  129. exposure:
  130. include: '*'
  131. endpoint:
  132. logfile:
  133. external-file: ./logs/${spring.application.name}/console.log
  134. # 日志配置
  135. logging:
  136. level:
  137. org.springframework: warn
  138. org.apache.dubbo: warn
  139. com.alibaba.nacos: warn
  140. config: classpath:logback.xml
  141. # redisson 缓存配置
  142. redisson:
  143. cacheGroup:
  144. # 用例: @Cacheable(cacheNames="groupId", key="#XXX") 方可使用缓存组配置
  145. - groupId: redissonCacheMap
  146. # 组过期时间(脚本监控)
  147. ttl: 60000
  148. # 组最大空闲时间(脚本监控)
  149. maxIdleTime: 60000
  150. # 组最大长度
  151. maxSize: 0
  152. # 分布式锁 lock4j 全局配置
  153. lock4j:
  154. # 获取分布式锁超时时间,默认为 3000 毫秒
  155. acquire-timeout: 3000
  156. # 分布式锁的超时时间,默认为 30 毫秒
  157. expire: 30000
  158. # mybatis配置
  159. mybatis:
  160. # 搜索指定包别名
  161. typeAliasesPackage: com.ruoyi.**.domain
  162. # 配置mapper的扫描,找到所有的mapper.xml映射文件
  163. mapperLocations: classpath:mapper/**/*.xml
  164. # swagger配置
  165. swagger:
  166. license: Powered By ruoyi
  167. licenseUrl: https://ruoyi.vip