diff --git a/changelog.md b/changelog.md
index b645af4e..2d68b2e1 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,9 @@
# changelog
+## 3.1.3
+
+- 修复监控日志乱码问题
+
## 3.1.2
- 修复图片上传保存后图片破损问题
diff --git a/sop-auth/pom.xml b/sop-auth/pom.xml
index e89b232d..caac5511 100644
--- a/sop-auth/pom.xml
+++ b/sop-auth/pom.xml
@@ -26,7 +26,7 @@
com.gitee.sop
sop-service-common
- 3.1.2-SNAPSHOT
+ 3.1.3-SNAPSHOT
diff --git a/sop-common/pom.xml b/sop-common/pom.xml
index 39a33e38..8f357c77 100644
--- a/sop-common/pom.xml
+++ b/sop-common/pom.xml
@@ -5,7 +5,7 @@
4.0.0
com.gitee.sop
sop-common
- 3.1.2-SNAPSHOT
+ 3.1.3-SNAPSHOT
pom
diff --git a/sop-common/sop-bridge-gateway/pom.xml b/sop-common/sop-bridge-gateway/pom.xml
index 5c1465bd..2034d181 100644
--- a/sop-common/sop-bridge-gateway/pom.xml
+++ b/sop-common/sop-bridge-gateway/pom.xml
@@ -5,11 +5,11 @@
sop-common
com.gitee.sop
- 3.1.2-SNAPSHOT
+ 3.1.3-SNAPSHOT
../pom.xml
4.0.0
- 3.1.2-SNAPSHOT
+ 3.1.3-SNAPSHOT
sop-bridge-gateway
@@ -17,7 +17,7 @@
com.gitee.sop
sop-gateway-common
- 3.1.2-SNAPSHOT
+ 3.1.3-SNAPSHOT
diff --git a/sop-common/sop-bridge-zuul/pom.xml b/sop-common/sop-bridge-zuul/pom.xml
index efd0927e..aee68506 100644
--- a/sop-common/sop-bridge-zuul/pom.xml
+++ b/sop-common/sop-bridge-zuul/pom.xml
@@ -5,11 +5,11 @@
sop-common
com.gitee.sop
- 3.1.2-SNAPSHOT
+ 3.1.3-SNAPSHOT
../pom.xml
4.0.0
- 3.1.2-SNAPSHOT
+ 3.1.3-SNAPSHOT
sop-bridge-zuul
@@ -17,7 +17,7 @@
com.gitee.sop
sop-gateway-common
- 3.1.2-SNAPSHOT
+ 3.1.3-SNAPSHOT
diff --git a/sop-common/sop-gateway-common/pom.xml b/sop-common/sop-gateway-common/pom.xml
index bb26587d..fc76d072 100644
--- a/sop-common/sop-gateway-common/pom.xml
+++ b/sop-common/sop-gateway-common/pom.xml
@@ -5,11 +5,11 @@
com.gitee.sop
sop-common
- 3.1.2-SNAPSHOT
+ 3.1.3-SNAPSHOT
../pom.xml
sop-gateway-common
- 3.1.2-SNAPSHOT
+ 3.1.3-SNAPSHOT
jar
sop-gateway-common
diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/result/GatewayResultExecutor.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/result/GatewayResultExecutor.java
index d3e891a5..87df32b9 100644
--- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/result/GatewayResultExecutor.java
+++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/result/GatewayResultExecutor.java
@@ -14,8 +14,11 @@ import com.gitee.sop.gatewaycommon.result.ResultExecutorForGateway;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.util.CollectionUtils;
+import org.springframework.util.StringUtils;
import org.springframework.web.server.ServerWebExchange;
+import org.springframework.web.util.UriUtils;
+import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.Locale;
@@ -46,6 +49,9 @@ public class GatewayResultExecutor extends BaseExecutorAdapter{
+ String errorMsg = getHeader(requestContext, SopConstants.X_SERVICE_ERROR_MESSAGE, (index)->{
if (index > -1) {
requestContext.getZuulResponseHeaders().remove(index);
}
});
+ if (StringUtils.hasText(errorMsg)) {
+ errorMsg = UriUtils.decode(errorMsg, StandardCharsets.UTF_8);
+ }
+ return errorMsg;
}
@Override
diff --git a/sop-common/sop-service-common/pom.xml b/sop-common/sop-service-common/pom.xml
index 7aa25523..8833f4f7 100644
--- a/sop-common/sop-service-common/pom.xml
+++ b/sop-common/sop-service-common/pom.xml
@@ -6,11 +6,11 @@
com.gitee.sop
sop-common
- 3.1.2-SNAPSHOT
+ 3.1.3-SNAPSHOT
../pom.xml
sop-service-common
- 3.1.2-SNAPSHOT
+ 3.1.3-SNAPSHOT
jar
sop-service-common
diff --git a/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/configuration/GlobalExceptionHandler.java b/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/configuration/GlobalExceptionHandler.java
index 9322981a..135175cb 100644
--- a/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/configuration/GlobalExceptionHandler.java
+++ b/sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/configuration/GlobalExceptionHandler.java
@@ -9,9 +9,11 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.util.UriUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import java.nio.charset.StandardCharsets;
/**
* 全局异常处理
@@ -75,7 +77,7 @@ public class GlobalExceptionHandler {
StackTraceElement stackTraceElement = stackTrace[i];
msg.append("
at ").append(stackTraceElement.toString());
}
- response.setHeader("x-service-error-message", msg.toString());
+ response.setHeader("x-service-error-message", UriUtils.encode(msg.toString(), StandardCharsets.UTF_8));
return this.processError(request, response, new ServiceException("系统繁忙"));
}
diff --git a/sop-example/sop-book/sop-book-web/pom.xml b/sop-example/sop-book/sop-book-web/pom.xml
index d56a1219..021e4a65 100644
--- a/sop-example/sop-book/sop-book-web/pom.xml
+++ b/sop-example/sop-book/sop-book-web/pom.xml
@@ -28,7 +28,7 @@
com.gitee.sop
sop-service-common
- 3.1.2-SNAPSHOT
+ 3.1.3-SNAPSHOT
com.gitee.sop
diff --git a/sop-example/sop-easyopen/pom.xml b/sop-example/sop-easyopen/pom.xml
index e874764d..b1baeb38 100644
--- a/sop-example/sop-easyopen/pom.xml
+++ b/sop-example/sop-easyopen/pom.xml
@@ -29,7 +29,7 @@
com.gitee.sop
sop-service-common
- 3.1.2-SNAPSHOT
+ 3.1.3-SNAPSHOT
diff --git a/sop-example/sop-story/sop-story-web/pom.xml b/sop-example/sop-story/sop-story-web/pom.xml
index 9a11a612..2eb38127 100644
--- a/sop-example/sop-story/sop-story-web/pom.xml
+++ b/sop-example/sop-story/sop-story-web/pom.xml
@@ -28,7 +28,7 @@
com.gitee.sop
sop-service-common
- 3.1.2-SNAPSHOT
+ 3.1.3-SNAPSHOT
com.gitee.sop
diff --git a/sop-gateway/pom.xml b/sop-gateway/pom.xml
index 50042fbc..8152cc6a 100644
--- a/sop-gateway/pom.xml
+++ b/sop-gateway/pom.xml
@@ -34,7 +34,7 @@
com.gitee.sop
sop-bridge-gateway
- 3.1.2-SNAPSHOT
+ 3.1.3-SNAPSHOT
diff --git a/sop-website/pom.xml b/sop-website/pom.xml
index f9b64410..37fc35b8 100644
--- a/sop-website/pom.xml
+++ b/sop-website/pom.xml
@@ -35,7 +35,7 @@
com.gitee.sop
sop-gateway-common
- 3.1.2-SNAPSHOT
+ 3.1.3-SNAPSHOT