he2802 1 年之前
父节点
当前提交
1c693561e7
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      zhongzheng-admin/src/main/java/com/zhongzheng/controller/CommonController.java

+ 2 - 1
zhongzheng-admin/src/main/java/com/zhongzheng/controller/CommonController.java

@@ -186,6 +186,7 @@ public class CommonController extends BaseController {
     public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
             throws Exception {
         try {
+            
             if (!FileUtils.checkAllowDownload(resource)) {
                 throw new Exception(StrUtil.format("资源文件({})非法,不允许下载。 ", resource));
             }
@@ -198,7 +199,7 @@ public class CommonController extends BaseController {
             response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
             FileUtils.setAttachmentResponseHeader(response, downloadName);
             FileUtils.writeBytes(downloadPath, response.getOutputStream());
-            
+
         } catch (Exception e) {
             log.error("下载文件失败", e);
         }