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

不同的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;


你可能感兴趣的:(java)