From 889faeb7a51ebbe51d32e1ee73cdee08f4b78d15 Mon Sep 17 00:00:00 2001 From: wangbing <1919101440@qq.com> Date: Sun, 30 Jun 2019 01:02:24 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=B8=8B=E8=BD=BD=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E4=B9=B1=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/SpringBoot/java/action/GlobalController.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/modules/SpringBoot/java/action/GlobalController.ftl b/src/main/resources/modules/SpringBoot/java/action/GlobalController.ftl index 4db44bec..5fac6b05 100644 --- a/src/main/resources/modules/SpringBoot/java/action/GlobalController.ftl +++ b/src/main/resources/modules/SpringBoot/java/action/GlobalController.ftl @@ -164,7 +164,7 @@ public class GlobalController implements ErrorController { HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_OCTET_STREAM); - headers.setContentDispositionFormData("attachment", file); + headers.setContentDispositionFormData("attachment", new String(downFile.getName().getBytes("UTF-8"), "iso-8859-1")); //======== //下载DEMO