@Aspect 拦截器相关

2021-05-01 08:28

阅读:701

标签:poi   etc   rgs   tsig   method   private   join   gets   获取   

执行时机:在HandlerInterceptor


@Pointcut("execution(* com.jbs.oms.aggreg.web.controller.*.*.*(..))")
private void excudeController() {
}

@Before("excudeController()")
public void before(JoinPoint joinPoint) {
  //通过joinPoint可以获取request相关参数:
  Object[] args = joinPoint.getArgs();
  
  //获取当前方法对象:
  MethodJoinPoint point = (MethodJoinPoint)joinPoint;
Signature signature = point.getSignature();
  Method method = signature.getMethod();
  
  //获取当前类:
  joinPoint.getTarget().getClass();
  
}

@Aspect 拦截器相关

标签:poi   etc   rgs   tsig   method   private   join   gets   获取   

原文地址:https://www.cnblogs.com/qlsty/p/12147118.html


评论


亲,登录后才可以留言!