记录spring aop
作者:互联网
//切入注解@RequestMapping
@Around("@annotation(request)")
public Object aroundThree(ProceedingJoinPoint proceedingJoinPoint,RequestMapping request) throws Throwable
{
System.out.println("aop---------------------------------------------------------------------");
System.out.println(Arrays.toString(request.value()));
System.out.println("aop---------------------------------------------------------------------");
return proceedingJoinPoint.proceed();
}
@Around("execution(* org.sxdata.jingwei.controller.*.*(..))")
public Object aroundThree(ProceedingJoinPoint proceedingJoinPoint) throws Throwable
{
Signature signature = proceedingJoinPoint.getSignature();
MethodSignature methodSignature = (MethodSignature)signature;
Method targetMethod = methodSignature.getMethod();
System.out.println(Arrays.toString(targetMethod.getAnnotation(RequestMapping.class).value()));
System.out.println(proceedingJoinPoint.getSignature().getName());
return proceedingJoinPoint.proceed();
}
标签:RequestMapping,记录,spring,proceedingJoinPoint,System,aop,println,out 来源: https://blog.csdn.net/weixin_43890281/article/details/121439497