In my application I have methods annotated like this:
@SomeAnnotation(key1="value1", key2 ="value2")
public void myMethod()
I have defined the following apsect to perform some action on executing of those methods:
@Aspect
public class MyAspect()
{
@Around("@annotation(my.package.SomeAnnotation)")
public Object doSomething(final ProceedingJoinPoint pjp) throws Throwable
{
...
}
}
Now I would like to use the annotation values ("value1" and "value2" in the above example) inside my advice. What is the way to access the annotation at this point?