From 1bbeba412a6880049ea9a8a649bfa4dbbf29ad44 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Tue, 22 Sep 2020 11:28:08 +0800
Subject: [PATCH] websocket关闭测试
---
src/main/java/com/moral/common/aop/ControllerAOP.java | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/moral/common/aop/ControllerAOP.java b/src/main/java/com/moral/common/aop/ControllerAOP.java
index 1b6072d..0c1c441 100644
--- a/src/main/java/com/moral/common/aop/ControllerAOP.java
+++ b/src/main/java/com/moral/common/aop/ControllerAOP.java
@@ -33,7 +33,7 @@
try {
result = pjp.proceed();
- log.info(pjp.getSignature() + "use time:" + (System.currentTimeMillis() - startTime));
+ // log.info(pjp.getSignature() + "use time:" + (System.currentTimeMillis() - startTime));
} catch (Throwable e) {
result = handlerException(pjp, e);
}
@@ -53,7 +53,10 @@
Method currentMethod = target.getClass().getMethod(msig.getName(), msig.getParameterTypes());
Type type = currentMethod.getGenericReturnType();
String message = e.getMessage();
+ Map<String, Object> resultMap = new HashMap<String, Object>();
if (e instanceof BusinessException) {
+ log.error(e.getMessage());
+ resultMap.put("msg", message);
} else if (e instanceof ValidateException) {
} else {
log.error(pjp.getSignature() + " error: " + e.toString(), e);
@@ -66,7 +69,6 @@
} else if (type == ResultBean.class) {
return new ResultBean(e);
} else if (type == Map.class) {
- Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("msg", message);
return resultMap;
} else if (type == Void.TYPE) {
--
Gitblit v1.8.0