File was renamed from pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/aop/OperationLogAspect.java |
| | |
| | | |
| | | @Aspect |
| | | @Component |
| | | public class OperationLogAspect { |
| | | public class LogAspect { |
| | | |
| | | @Value("${pms.sso.curUserUrl}") |
| | | public String SsoCurUserUrl ; |
| | |
| | | this.restTemplate = restTemplate ; |
| | | } |
| | | |
| | | @AfterReturning(pointcut = "@annotation(com.dy.pmsGlobal.aop.OperationDescription)", returning = "result") |
| | | @AfterReturning(pointcut = "@annotation(com.dy.pmsGlobal.aop.Log)", returning = "result") |
| | | public void logAfterReturning(JoinPoint joinPoint, Object result) { |
| | | // 获取方法的中文描述 |
| | | MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature(); |
| | | OperationDescription operationDescription = methodSignature.getMethod().getAnnotation(OperationDescription.class); |
| | | Log operationDescription = methodSignature.getMethod().getAnnotation(Log.class); |
| | | String operationName = operationDescription.value(); |
| | | //结果 |
| | | BaseResponse response = (BaseResponse)result; |