o.s.b.w.servlet.support.ErrorPageFilter : Cannot forward to error page
for request [/test] as the response has already been committed. As a
result, the response may have the wrong status code. If your applicationis running on WebSphere Application Server you may be able to resolve this problem by setting com.ibm.ws.webcontainer.invokeFlushAfterServiceto false
参考了很多办法,有说在启动类中添加如下代码可以解决:
@Beanpublic ErrorPageFilter errorPageFilter() {return new ErrorPageFilter();}@Beanpublic FilterRegistrationBean disableSpringBootErrorFilter(ErrorPageFilter filter) {FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();filterRegistrationBean.setFilter(filter);filterRegistrationBean.setEnabled(false);return filterRegistrationBean;}
还有包括在pom文件中注释掉内嵌的Tomcat依赖的解决办法。
但是我尝试无果。

src/main/resources **/*.*
https://blog.csdn.net/ljf12138/article/details/117786285
上一篇:有诗意的诗经四字成语
下一篇:有谁可以告诉我一百句赞美女人的话