我已经实现了自定义Web过滤器,并尝试读取完整的HTTP请求,但是在订阅时出现错误
public class AppWebFilter implements WebFilter {
@Override
public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
exchange.getRequest().getBody().map(m->m.read()).doOnNext(k->k.byteValue()).subscribe();
return chain.filter(exchange);
}
}