refactor(web): 拆分 web 模块

This commit is contained in:
liquor
2025-05-20 14:58:38 +00:00
committed by Charles7c
parent adaf475835
commit 9c6182e028
34 changed files with 123 additions and 49 deletions

View File

@@ -0,0 +1,3 @@
top.continew.starter.web.autoconfigure.mvc.WebMvcAutoConfiguration
top.continew.starter.web.autoconfigure.cors.CorsAutoConfiguration
top.continew.starter.web.autoconfigure.server.UndertowAutoConfiguration

View File

@@ -0,0 +1,42 @@
--- ### 响应配置
continew-starter.web.response:
# 是否开启国际化默认false
i18n: false
# 响应类全名(配置后 response-style 将不再生效)
response-class-full-name: top.continew.starter.web.model.R
# 自定义失败 HTTP 状态码默认200建议业务和通信状态码区分
default-http-status-code-on-error: 200
# 自定义成功响应码默认0
default-success-code: 0
# 自定义成功提示默认ok
default-success-msg: ok
# 自定义失败响应码默认1
default-error-code: 1
# 自定义失败提示默认error
default-error-msg: error
# 是否打印异常日志默认false
print-exception-in-global-advice: true
# 是否将原生异常错误信息填充到状态信息中默认false
origin-exception-using-detail-message: true
# 例外包路径(支持数字, * 和 ** 通配符匹配),该包路径下的 Controller 将被忽略处理
exclude-packages:
- io.swagger.**
- org.springdoc.**
- org.springframework.boot.actuate.*
--- ### 服务器配置
server:
## Undertow 服务器配置
undertow:
# HTTP POST 请求内容的大小上限(默认 -1不限制
max-http-post-size: -1
# 以下的配置会影响 buffer这些 buffer 会用于服务器连接的 IO 操作,有点类似 Netty 的池化内存管理
# 每块 buffer的空间大小越小的空间被利用越充分不要设置太大以免影响其他应用合适即可
buffer-size: 512
# 是否分配的直接内存NIO 直接分配的堆外内存)
direct-buffers: true
threads:
# 设置 IO 线程数,它主要执行非阻塞的任务,它们会负责多个连接(默认每个 CPU 核心一个线程)
io: 8
# 阻塞任务线程池,当执行类似 Servlet 请求阻塞操作Undertow 会从这个线程池中取得线程(它的值设置取决于系统的负载)
worker: 256