Skip to content

Commit 433b00f

Browse files
committed
delete logmap
1 parent 7ba2ecb commit 433b00f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

codingmore-common/src/main/java/com/codingmore/component/WebLogAspect.java

+8-6
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ public void doBefore(JoinPoint joinPoint) throws Throwable {
5050
public void doAfterReturning(Object ret) throws Throwable {
5151
}
5252

53+
/**
54+
* 环绕通知
55+
*
56+
* @param joinPoint
57+
* @return
58+
* @throws Throwable
59+
*/
5360
@Around("webLog()")
5461
public Object doAround(ProceedingJoinPoint joinPoint) throws Throwable {
5562
long startTime = System.currentTimeMillis();
@@ -77,12 +84,7 @@ public Object doAround(ProceedingJoinPoint joinPoint) throws Throwable {
7784
webLog.setStartTime(startTime);
7885
webLog.setUri(request.getRequestURI());
7986
webLog.setUrl(request.getRequestURL().toString());
80-
Map<String,Object> logMap = new HashMap<>();
81-
logMap.put("url",webLog.getUrl());
82-
logMap.put("method",webLog.getMethod());
83-
logMap.put("parameter",webLog.getParameter());
84-
logMap.put("spendTime",webLog.getSpendTime());
85-
logMap.put("description",webLog.getDescription());
87+
8688
LOGGER.info("{}", JSONUtil.parse(webLog));
8789
return result;
8890
}

0 commit comments

Comments
 (0)