暂时解决java.lang.IllegalStateException: It is invalid to call isReady() when the response has not been put into non-blocking mode *

环境:

    本机-apache-tomcat-9.0.0.M21

    服务器-apache-tomcat-9.0.0.M9

错误复盘:

最初不知道是tomcat版本解决的,实现了一个下载PDF文件的功能,在action中使用SpringMVC提供的功能对OutputStream进行了close(这块内部逻辑暂不了解)

另外,通过切面@After注解记录用户访问日志,其中使用了一行代码JSON.toJSONString(arguments),结果程序报错

  因为程序在本地没有这个问题,怀疑是tomcat版本导致,暂时通过升级tomcat版本的方式解决,后续进行深入研究。

原文地址:https://www.cnblogs.com/wendelhuang/p/6958634.html