文件能够正常下载,但是后端报错了
···java
org.springframework.http.converter.HttpMessageNotWritableException: No converter for [class com.ruoyi.common.core.domain.AjaxResult] with preset Content-Type 'application/octet-stream'
···
如果是若依框架的话,请求头直接加上这个
FileUtils.setAttachmentResponseHeader(response, fileName);
文件下载通过response获取outputStream再调用这个方法
FileUtils.writeBytes(fileAddress, response.getOutputStream());
检查io流有没有关闭,请求头有没有加上参数