opt:1.优化LogAspect。
This commit is contained in:
@@ -43,24 +43,10 @@ public class LogAspect {
|
||||
*/
|
||||
@Around("logPointCut()")
|
||||
public Object logAround(ProceedingJoinPoint point) throws Throwable {
|
||||
//// MethodSignature signature = (MethodSignature) joinPoint.getSignature();
|
||||
//
|
||||
//// String params = JSONObject.toJSONString(joinPoint.getArgs());
|
||||
////
|
||||
////
|
||||
// Object result;
|
||||
//// log.info("【日志注解】开始执行 -- {}:{} {}", className, methodName, params);
|
||||
// result = joinPoint.proceed();
|
||||
//// log.info("返回参数:{}" ,JSONObject.toJSONString(result));
|
||||
// return result;
|
||||
Object result = null;
|
||||
long beginTime = System.currentTimeMillis();
|
||||
try {
|
||||
// 执行方法
|
||||
result = point.proceed();
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// 执行方法
|
||||
result = point.proceed();
|
||||
// 执行时长(毫秒)
|
||||
long time = System.currentTimeMillis() - beginTime;
|
||||
// 保存日志
|
||||
|
||||
Reference in New Issue
Block a user