I want to intercept the number of accesses to the interface in the controller, but the result is useless. The following is my code
@Component @Aspect @EnableAspectJAutoProxy(proxyTargetClass = true) public class EduAspect { private final static Logger LOGGER = LoggerFactory.getLogger(EduAspect.class); //我想拦截sample包下所有以.Controller结尾的方法,但是拦截不到 @Pointcut("execution(* com.sample..*Controller.*(..))") public void declareLoggerJoinPointExpression() { } @Pointcut("@annotation(com.sample.common.annotation.Frequency)") public void declareFrequencyJoinPoint(){ }
The code is as above, but aop seems to not work. I also enabled cglib
You haven’t finished writing yet...
You just declared the entry point. But you didn’t notify the execution.
For details on how to configure it, please see; http://docs.spring.io/spring/...