执行时机:在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();
}
原文地址:https://www.cnblogs.com/qlsty/p/12147118.html
时间: 2024-10-01 06:44:42