|
@@ -269,7 +269,8 @@ public class BaseController {
|
|
|
*/
|
|
*/
|
|
|
@SneakyThrows
|
|
@SneakyThrows
|
|
|
protected void downloadFile(HttpServletResponse response,String fileName) {
|
|
protected void downloadFile(HttpServletResponse response,String fileName) {
|
|
|
- File file = ResourceUtils.getFile("classpath:file/"+fileName);
|
|
|
|
|
|
|
+ String path = this.getClass().getClassLoader().getResource("").getPath();
|
|
|
|
|
+ File file = new File(path + "file/"+fileName);
|
|
|
// 文件转成字节数组
|
|
// 文件转成字节数组
|
|
|
byte[] fileByte = Files.readAllBytes(file.toPath());
|
|
byte[] fileByte = Files.readAllBytes(file.toPath());
|
|
|
// 设置response的Header
|
|
// 设置response的Header
|