opt:1.优化LogAspect。
This commit is contained in:
@@ -43,24 +43,10 @@ public class LogAspect {
|
|||||||
*/
|
*/
|
||||||
@Around("logPointCut()")
|
@Around("logPointCut()")
|
||||||
public Object logAround(ProceedingJoinPoint point) throws Throwable {
|
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;
|
Object result = null;
|
||||||
long beginTime = System.currentTimeMillis();
|
long beginTime = System.currentTimeMillis();
|
||||||
try {
|
|
||||||
// 执行方法
|
// 执行方法
|
||||||
result = point.proceed();
|
result = point.proceed();
|
||||||
} catch (Throwable e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
// 执行时长(毫秒)
|
// 执行时长(毫秒)
|
||||||
long time = System.currentTimeMillis() - beginTime;
|
long time = System.currentTimeMillis() - beginTime;
|
||||||
// 保存日志
|
// 保存日志
|
||||||
|
|||||||
Reference in New Issue
Block a user