我遇到了最奇怪的问题。
我有一个HandlerInterceptorAdapterwith的子类postHandle()。不管其他代码如何,如果我在拦截器中添加以下行,调度程序 servlet 最终会失败并getOutputStream() has already been called for this response出现错误。
boolean isRedirect = modelAndView.getViewName().startsWith("redirect:");
似乎访问view以modelAndView某种方式干扰了响应输出流。我很困惑。有人有什么想法吗?
谢谢