Is there a Spring AOP annotation which lets us go inside a method only if that annotation returns true? [duplicate]
问题 This question already has answers here : How to write an annotation/aspect to not enter a method but return null if a given condition is false? (2 answers) Closed last year . Is there a Spring AOP annotation which lets us go inside a method only if that annotation returns true? I want something like this: @CustomAnnotation public String foo(){ System.out.println("Hello World"); return "foo"; } So now only when the @CustomAnnotation returns true is when we will go inside the foo() method &