From 135e48008d3148dd5288173338b8ef8f2bfbe05b Mon Sep 17 00:00:00 2001 From: thinkgem Date: Mon, 13 Sep 2021 14:36:32 +0800 Subject: [PATCH] update --- .../java/com/jeesite/common/web/http/ServletUtils.java | 9 ++++++--- parent/pom.xml | 2 +- web/bin/docker/Dockerfile | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) 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 0750d40e..a5932602 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 @@ -21,6 +21,7 @@ import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; import com.fasterxml.jackson.databind.util.JSONPObject; +import com.jeesite.common.codec.EncodeUtils; import com.jeesite.common.collect.MapUtils; import com.jeesite.common.io.PropertiesUtils; import com.jeesite.common.lang.ExceptionUtils; @@ -253,7 +254,8 @@ public class ServletUtils { } } if (response != null){ - response.setContentType(MediaType.APPLICATION_JSON_VALUE+";charset=UTF-8"); + response.setContentType(MediaType.APPLICATION_JSON_VALUE); + response.setCharacterEncoding(EncodeUtils.UTF_8); } if (object == null) { object = resultMap; @@ -362,10 +364,10 @@ 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+";charset=UTF-8"; + type = MediaType.APPLICATION_JSON_VALUE; }else if (StringUtils.startsWith(string, "<") && StringUtils.endsWith(string, ">")){ if (StringUtils.startsWith(string, " http://192.168.56.102:2375 - ${project.groupId}/${project.artifactId}:4.2 + ${project.groupId}/${project.artifactId}:4.3 diff --git a/web/bin/docker/Dockerfile b/web/bin/docker/Dockerfile index 45142e42..0926aa8b 100644 --- a/web/bin/docker/Dockerfile +++ b/web/bin/docker/Dockerfile @@ -22,4 +22,4 @@ ENTRYPOINT java $JAVA_OPTS -cp /app $JAVA_OPTS org.springframework.boot.loader.W EXPOSE 8980 -#docker run -p 8980:8980 com.jeesite/jeesite-web:4.2 +#docker run -p 8980:8980 com.jeesite/jeesite-web:4.3