Module bus.vortex

Class FormatFilter

java.lang.Object
org.miaixz.bus.vortex.filter.AbstractFilter
org.miaixz.bus.vortex.filter.FormatFilter
All Implemented Interfaces:
Filter, org.springframework.web.server.WebFilter

@Order(2147483645) public class FormatFilter extends AbstractFilter
响应格式化过滤器,确保所有响应数据都是JSON格式
Since:
Java 17+
Author:
Justubborn
  • 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:
      doFilter in class AbstractFilter
      Parameters:
      exchange - 当前的 ServerWebExchange 对象
      chain - 过滤器链
      context - 请求上下文
      Returns:
      reactor.core.publisher.Mono<Void> 表示异步处理完成