1、浏览器文件下载,我是下载本地服务器的。
2、这里只是一个工具类,前端穿过来即可。


response.addHeader("Content-Disposition","attachment;filename=" + URLEncoder.encode(fileName, StandardCharsets.UTF_8.name()));
1、浏览器文件下载,我是下载本地服务器的。
2、这里只是一个工具类,前端穿过来即可。
response.addHeader("Content-Disposition","attachment;filename=" + URLEncoder.encode(fileName, StandardCharsets.UTF_8.name()));
本文标题:SpringBoot 文件下载功能实现
本文链接:https://www.haomeiwen.com/subject/qblerftx.html
网友评论