문제

I have a custom Annotation called @Invisible. Now I want to match all calls an a method which DOESN'T HAVE an @Invisible Annotation. How can i do this? (with annotation style development)

My first try was:

@Pointcut("execution(!@my.package.Invisible * some.other.package.execute(..))")

but this doesn't seem to work...

In other words: if the method has the Invisible annotation I want to ignore it. Otherwise i want to execute some code with my advice...

도움이 되었습니까?

해결책

try something like execution(* some.other.package.execute(..)) && !@annotation(my.package.Invisible)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top