From 324c7e8c61c54228eefbb919bc36cfda950b99b2 Mon Sep 17 00:00:00 2001
From: liaozan <378024053@qq.com>
Date: Fri, 28 Jul 2023 21:43:29 +0800
Subject: [PATCH] Add test env
---
pom.xml | 8 ++++++++
.../dubbo/filter/DubboExceptionFilter.java | 13 ++++++-------
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/pom.xml b/pom.xml
index 177c6c7..2110138 100644
--- a/pom.xml
+++ b/pom.xml
@@ -734,6 +734,14 @@
registry-vpc.cn-hangzhou.aliyuncs.com/schbrain_dev
+
+
+ test
+
+ test
+ registry-vpc.cn-hangzhou.aliyuncs.com/schbrain_dev
+
+
prod
diff --git a/starters/dubbo-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/dubbo/filter/DubboExceptionFilter.java b/starters/dubbo-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/dubbo/filter/DubboExceptionFilter.java
index 40eaaf5..363c38a 100644
--- a/starters/dubbo-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/dubbo/filter/DubboExceptionFilter.java
+++ b/starters/dubbo-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/dubbo/filter/DubboExceptionFilter.java
@@ -29,16 +29,15 @@ public class DubboExceptionFilter extends ExceptionFilter {
return;
}
- Throwable cause = ExceptionUtil.getRootCause(appResponse.getException());
-
- if (cause instanceof ConstraintViolationException) {
- cause = createParamInvalidException(invocation, (ConstraintViolationException) cause);
+ Throwable rootCause = ExceptionUtil.getRootCause(appResponse.getException());
+ if (rootCause instanceof ConstraintViolationException) {
+ rootCause = createParamInvalidException(invocation, (ConstraintViolationException) rootCause);
}
+ appResponse.setException(rootCause);
- appResponse.setException(cause);
- logErrorDetail(invocation, cause);
+ logErrorDetail(invocation, rootCause);
- if (cause instanceof BaseException) {
+ if (rootCause instanceof BaseException) {
return;
}
--
GitLab