If I have Annotation: and trying to use it as target marker of Spring AOP aspect joinpoint marker, it works well for some aspect, weaved by that composite pointcut: In other words, it works well as “straight-forward” annotation usage, when I write code like this: But in case of META-annotation…: …it doesn’t work for example, in that code: Certainly, I
Tag: pointcut
How to create pointcut to feign client that supports interface inheritance?
In a Spring Boot project I have a simple feign client I need to intercept all calls and for this and I’m creating a common library that can be used in different projects. To achieve it I try to use Spring AOP. I created an aspect that wraps all public methods of the object annotated with MyAnnotation It works correctly
Create custom method level annotation only available to specific return types [AOP]
I want to create an annotation which is only available to a specific type of return values. For example this is my annotation. I also have an interface: An example class that implements my interface: So after these, I want to configure my annotation in a way that it won’t even compile if the return type is not implementing MyInterface.