update 优化 使用 hutool 替换 ruoyi 自带工具类 解决部分方法过期与高版本JDK不兼容问题

This commit is contained in:
疯狂的狮子li
2021-06-12 20:13:35 +08:00
parent 97a0c890bf
commit b3541e9758
13 changed files with 418 additions and 1366 deletions

View File

@ -54,10 +54,10 @@ public class CommonController
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
FileUtils.setAttachmentResponseHeader(response, realFileName);
FileUtils.writeBytes(filePath, response.getOutputStream());
FileUtils.writeToStream(filePath, response.getOutputStream());
if (delete)
{
FileUtils.deleteFile(filePath);
FileUtils.del(filePath);
}
}
catch (Exception e)
@ -111,7 +111,7 @@ public class CommonController
String downloadName = StrUtil.subAfter(downloadPath, "/",true);
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
FileUtils.setAttachmentResponseHeader(response, downloadName);
FileUtils.writeBytes(downloadPath, response.getOutputStream());
FileUtils.writeToStream(downloadPath, response.getOutputStream());
}
catch (Exception e)
{