application.yml 4.0 KB

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