| | |
| | | @Around("serviceLog()") |
| | | @SuppressWarnings("unchecked") |
| | | public Object around(ProceedingJoinPoint joinPoint) throws Throwable { |
| | | try { |
| | | long starTime = System.currentTimeMillis(); |
| | | //通过反射获取被调用方法的Class |
| | | Class type = joinPoint.getSignature().getDeclaringType(); |
| | |
| | | "参数为:{}\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(); |
| | | } |
| | | } |