How can I create a Pointcut around my methods annotated with @RequestMapping?
I have a Pointcut defined that I’d like to restrict a bit further:
@Pointcut("execution(public * company.controllers.AbstractController+.*(..))")
public void methodPointcut() { }
Is it possible to further restrict that to only methods which are annotated with @RequestMapping?
I tried adding && @annotation to the end of the Pointcut, but that is not a well formed Pointcut.
I think this was easiest to do with two Pointcuts.
and
Then simply doing:
@Before(“methodPointcut() && requestMapping()”)