Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Proposal for easing the development of annotation driven static method advices and pointcuts [SPR-14227] #18801
I've had to implement usage tracking of some business-level service methods. For accomplishing this, there's an annotation defined
It's important to note the advice need the know the parameter of the annotation when method calls get intercepted.
I saw examples in Aspect Oriented Programming with Spring how the annotation's properties can be supplied to aspects, however doing the same with the standard Spring AOP wasn't that straightforward.
What I wanted to achieve resembled to the logic of NameMatchMethodPointcutAdvisor, so I sub-classed AbstractGenericPointcutAdvisor to AnnotationMatchMethodPointcutAdvisor, implemented an annotation driven version of it and added a custom advice for logging the usage.
I'd like to contribute my solution to Spring AOP, because I think it eases the development effort needed to implement advices for a custom annotation.
Please let me know what to do you think.