springboot下载文件抛异常

一个下载文件的方法,每次文件都能成功下载,但控制台总会报错:

java.lang.IllegalStateException: Cannot call sendError() after the response has been committed
org.springframework.http.converter.HttpMessageNotWritableException: No converter for [class java.lang.Boolean] with preset Content-Type 'application/octet-stream;charset=UTF-8'

springboot下载文件抛异常_第1张图片

参考文章

Cannot call sendError() after the response has been committed

【SSH问题】java.lang.IllegalStateException: Cannot call sendError() after the response has been committe

你可能感兴趣的:(后端)