File tree 1 file changed +8
-6
lines changed
codingmore-common/src/main/java/com/codingmore/component
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,13 @@ public void doBefore(JoinPoint joinPoint) throws Throwable {
50
50
public void doAfterReturning (Object ret ) throws Throwable {
51
51
}
52
52
53
+ /**
54
+ * 环绕通知
55
+ *
56
+ * @param joinPoint
57
+ * @return
58
+ * @throws Throwable
59
+ */
53
60
@ Around ("webLog()" )
54
61
public Object doAround (ProceedingJoinPoint joinPoint ) throws Throwable {
55
62
long startTime = System .currentTimeMillis ();
@@ -77,12 +84,7 @@ public Object doAround(ProceedingJoinPoint joinPoint) throws Throwable {
77
84
webLog .setStartTime (startTime );
78
85
webLog .setUri (request .getRequestURI ());
79
86
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
+
86
88
LOGGER .info ("{}" , JSONUtil .parse (webLog ));
87
89
return result ;
88
90
}
You can’t perform that action at this time.
0 commit comments