From ce64e667815b39efdc2f8bd52be0d43d49db8d84 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期日, 17 七月 2022 00:06:29 +0800
Subject: [PATCH] 优化小区位置
---
service-api/src/main/java/com/java110/api/aop/PageProcessAspect.java | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/service-api/src/main/java/com/java110/api/aop/PageProcessAspect.java b/service-api/src/main/java/com/java110/api/aop/PageProcessAspect.java
index c9d221c..e5ca43a 100644
--- a/service-api/src/main/java/com/java110/api/aop/PageProcessAspect.java
+++ b/service-api/src/main/java/com/java110/api/aop/PageProcessAspect.java
@@ -3,7 +3,6 @@
import com.alibaba.fastjson.JSONObject;
import com.java110.core.context.IPageData;
import com.java110.core.context.PageData;
-import com.java110.core.context.SecureInvocation;
import com.java110.core.log.LoggerFactory;
import com.java110.utils.constant.CommonConstant;
import com.java110.utils.exception.FilterException;
@@ -113,7 +112,6 @@
String componentMethod = "";
if (url.contains("callComponent")) { //缁勪欢澶勭悊
String[] urls = url.split("/");
-
if (urls.length == 6) {
componentCode = urls[4];
componentMethod = urls[5];
@@ -139,7 +137,10 @@
logger.debug("鍒囬潰 鑾峰彇鍒扮殑pd=" + JSONObject.toJSONString(pd));
request.setAttribute(CommonConstant.CONTEXT_PAGE_DATA, pd);
+ //璋冪敤閾�
+ //Java110TraceFactory.createTrace(componentCode + "/" + componentMethod, headers);
}
+
@AfterReturning(returning = "ret", pointcut = "dataProcess()")
public void doAfterReturning(Object ret) throws Throwable {
@@ -156,14 +157,15 @@
public void after(JoinPoint jp) throws IOException {
// 鎺ユ敹鍒拌姹傦紝璁板綍璇锋眰鍐呭
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
-
HttpServletRequest request = attributes.getRequest();
+ //璁板綍璋冪敤閾�
+ //Java110TraceFactory.putAnnotations(TraceAnnotationsDto.VALUE_CLIENT_RECEIVE);
+
PageData pd = request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA) != null ? (PageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA) : null;
//淇濆瓨鏃ュ織澶勭悊
if (pd == null) {
return;
}
-
//鍐檆ookies淇℃伅
writeCookieInfo(pd, attributes);
@@ -177,7 +179,7 @@
return o;
} catch (Throwable e) {
logger.error("鎵ц鏂规硶寮傚父", e);
- return new ResponseEntity("鍐呴儴寮傚父" + e.getLocalizedMessage(), HttpStatus.BAD_REQUEST);
+ return new ResponseEntity(e.getLocalizedMessage(), HttpStatus.BAD_REQUEST);
}
}
@@ -194,7 +196,7 @@
return token;
}
for (Cookie cookie : request.getCookies()) {
- if (CommonConstant.COOKIE_AUTH_TOKEN.equals(cookie.getName()) ) {
+ if (CommonConstant.COOKIE_AUTH_TOKEN.equals(cookie.getName())) {
token = cookie.getValue();
}
}
--
Gitblit v1.8.0