在后置过滤器中使用Zuul作为代理时如何读取响应主体?
@Component public class PostFilter extends ZuulFilter { private static final Logger log = LoggerFactory.getLogger(PostFilter.class); @Override public String filterType() { return "post"; } @Override public int filterOrder() { return 2000; } @Override public boolean shouldFilter() { return true; } @Override public Object run() { RequestContext ctx = RequestContext.getCurrentContext(); ctx.getResponseBody(); // null // cant't do this,cause input stream is used later in other filters and I got InputStream Closed exception // GZIPInputStream gzipInputStream = new GZIPInputStream(stream); return null; } }