From 006b102e1625ffebaf814ace8e5d86ebda40021a Mon Sep 17 00:00:00 2001 From: "ian.zhang" Date: Fri, 11 Sep 2020 12:05:54 +0800 Subject: [PATCH] Update correct content type Update correct content type --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1bd0b68d..d7bf60a4 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ DEMO代码地址:[https://github.com/alibaba/easyexcel/blob/master/src/test/ja @GetMapping("download") public void download(HttpServletResponse response) throws IOException { // 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman - response.setContentType("vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); response.setCharacterEncoding("utf-8"); // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系 String fileName = URLEncoder.encode("测试", "UTF-8").replaceAll("\\+", "%20");