puzhibing
2023-03-11 2d08b036f5bdb9c34d686d6d125d5690a948ffa0
user/guns-admin/src/main/java/com/supersavedriving/user/core/common/aspect/ServiceLogAspect.java
@@ -31,6 +31,7 @@
    @Around("serviceLog()")
    @SuppressWarnings("unchecked")
    public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
        try {
        long starTime = System.currentTimeMillis();
        //通过反射获取被调用方法的Class
        Class type = joinPoint.getSignature().getDeclaringType();
@@ -66,7 +67,9 @@
                "参数为:{}\n" +
                "返回结果:{}", typeName, methodName, serviceLog.name(), serviceLog.url(),
                (System.currentTimeMillis() - starTime), jsonObject.toJSONString(), JSONObject.toJSONString(res));
        //返回执行结果
        return res;
        }catch (Exception e){
            e.printStackTrace();
        }
        return joinPoint.proceed();
    }
}