java.lang.Object
org.miaixz.bus.vortex.filter.AbstractFilter
org.miaixz.bus.vortex.filter.FormatFilter
- All Implemented Interfaces:
Filter,org.springframework.web.server.WebFilter
响应格式化过滤器,确保所有响应数据都是JSON格式
- Since:
- Java 17+
- Author:
- Justubborn
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.miaixz.bus.vortex.filter.AbstractFilter
checkParams, filter, getAssets, getContext, getRequestMap, setContentType
-
Constructor Details
-
FormatFilter
public FormatFilter()
-
-
Method Details
-
doFilter
protected reactor.core.publisher.Mono<Void> doFilter(org.springframework.web.server.ServerWebExchange exchange, org.springframework.web.server.WebFilterChain chain, Context context) 内部过滤方法,执行响应格式化逻辑- Specified by:
doFilterin classAbstractFilter- Parameters:
exchange- 当前的 ServerWebExchange 对象chain- 过滤器链context- 请求上下文- Returns:
reactor.core.publisher.Mono<Void>表示异步处理完成
-