ava.lang.IllegalStateException: It is invalid to call isReady() when the response has not been put i

来源:互联网 发布:仿真美女机器人软件 编辑:程序博客网 时间:2024/06/05 23:46

不同的tomcat对应这个错误的报错方式是不一样的

在更高的版本里面报错如下

getOutputStream() has already been called for this response

我这边报错的原因是在将response,与request转换成JSON.toJSONString(arguments)里面的参数时导致的


HttpServletResponse response;HttpServletRequest request;以注入的方式引入就不会再转换时报错了,也就是在controller层的接口数据插入时去掉

HttpServletResponse response,HttpServletRequest request

而是与下面的方式引入

@Autowired
HttpServletResponse response;
@Autowired
HttpServletRequest request;


阅读全文
0 0
原创粉丝点击