java - Problem about aop not working in controller
滿天的星座
滿天的星座 2017-06-30 09:56:23
0
1
754

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

滿天的星座
滿天的星座

reply all (1)
大家讲道理

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/...

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!