diff --git a/common/src/main/java/com/jeesite/common/web/http/ServletUtils.java b/common/src/main/java/com/jeesite/common/web/http/ServletUtils.java index f9277f17..b3d76c64 100644 --- a/common/src/main/java/com/jeesite/common/web/http/ServletUtils.java +++ b/common/src/main/java/com/jeesite/common/web/http/ServletUtils.java @@ -213,7 +213,7 @@ public class ServletUtils { return XmlMapper.toXml(resultMap); }else{ if (response != null){ - response.setContentType(MediaType.APPLICATION_JSON_VALUE); + response.setContentType(MediaType.APPLICATION_JSON_VALUE+";charset=UTF-8"); } if (ObjectUtils.toBoolean(PropertiesUtils.getInstance().getProperty("web.jsonp.enabled"))) { String functionName = request.getParameter("__callback"); @@ -225,7 +225,7 @@ public class ServletUtils { } }else{ if (response != null){ - response.setContentType(MediaType.APPLICATION_JSON_VALUE); + response.setContentType(MediaType.APPLICATION_JSON_VALUE+";charset=UTF-8"); } return JsonMapper.toJson(resultMap); } @@ -300,7 +300,7 @@ public class ServletUtils { if (type == null && StringUtils.isBlank(response.getContentType())){ if ((StringUtils.startsWith(string, "{") && StringUtils.endsWith(string, "}")) || (StringUtils.startsWith(string, "[") && StringUtils.endsWith(string, "]"))){ - type = MediaType.APPLICATION_JSON_VALUE; + type = MediaType.APPLICATION_JSON_VALUE+";charset=UTF-8"; }else if (StringUtils.startsWith(string, "<") && StringUtils.endsWith(string, ">")){ if (StringUtils.startsWith(string, "