From dbc5dfbd7b845f594e53d4caa35fb2b9bea3e96a Mon Sep 17 00:00:00 2001 From: zer0Black Date: Thu, 1 Apr 2021 08:53:40 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=B7=BB=E5=8A=A0=E3=80=91=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=97=A0=E7=94=A8=E7=9A=84=E6=B3=A8=E9=87=8A=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/controller/CommonController.java | 58 ------------------- 1 file changed, 58 deletions(-) diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/CommonController.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/CommonController.java index a15dc5be..2ab94a15 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/CommonController.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/CommonController.java @@ -183,64 +183,6 @@ public class CommonController { } -// /** -// * 下载文件 -// * 请求地址:http://localhost:8080/common/download/{user/20190119/e1fe9925bc315c60addea1b98eb1cb1349547719_1547866868179.jpg} -// * -// * @param request -// * @param response -// * @throws Exception -// */ -// @GetMapping(value = "/download/**") -// public void download(HttpServletRequest request, HttpServletResponse response) throws Exception { -// // ISO-8859-1 ==> UTF-8 进行编码转换 -// String filePath = extractPathFromPattern(request); -// // 其余处理略 -// InputStream inputStream = null; -// OutputStream outputStream = null; -// try { -// filePath = filePath.replace("..", ""); -// if (filePath.endsWith(",")) { -// filePath = filePath.substring(0, filePath.length() - 1); -// } -// String localPath = uploadpath; -// String downloadFilePath = localPath + File.separator + filePath; -// File file = new File(downloadFilePath); -// if (file.exists()) { -// response.setContentType("application/force-download");// 设置强制下载不打开             -// response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"),"iso-8859-1")); -// inputStream = new BufferedInputStream(new FileInputStream(file)); -// outputStream = response.getOutputStream(); -// byte[] buf = new byte[1024]; -// int len; -// while ((len = inputStream.read(buf)) > 0) { -// outputStream.write(buf, 0, len); -// } -// response.flushBuffer(); -// } -// -// } catch (Exception e) { -// log.info("文件下载失败" + e.getMessage()); -// // e.printStackTrace(); -// } finally { -// if (inputStream != null) { -// try { -// inputStream.close(); -// } catch (IOException e) { -// e.printStackTrace(); -// } -// } -// if (outputStream != null) { -// try { -// outputStream.close(); -// } catch (IOException e) { -// e.printStackTrace(); -// } -// } -// } -// -// } - /** * @功能:pdf预览Iframe * @param modelAndView