java.lang.IllegalStateException: Cannot call sendError() after the response has been committe

报错如下:

java.lang.IllegalStateException: Cannot call sendError() after the response has been committe

 

java.lang.IllegalStateException: Cannot call sendError() after the response has been committe

 代码如下:

java.lang.IllegalStateException: Cannot call sendError() after the response has been committe

错误原因:

关闭输出流后,便关闭了socket,再一次发送response会报错,应将return RestResponse.success改为return null,问题得以解决。

解决如下:

java.lang.IllegalStateException: Cannot call sendError() after the response has been committe

不要问我为什么,我想带一人回云深不知处,带回去,藏起来。

 

上一篇:es6数组方法find()、findIndex() filter()的总结


下一篇:java.lang.IllegalStateException: Cannot call sendError() after the response has been committed解读