Spring AOP:获取切入点注释的参数
问题描述:
考虑到我已经定义了以下方面:
Consider I have defined the following aspect:
@Aspect
public class SampleAspect {
@Around(value="@annotation(sample.SampleAnnotation)")
public Object display(ProceedingJoinPoint joinPoint) throws Throwable {
// ...
}
}
和注释
public @interface SampleAnnotation {
String value() default "defaultValue";
}
是否可以通过显示方法读取显示方法中的注释SampleAnnotation的value参数?
Is there a way to read the value parameter of the annotation SampleAnnotation in the display method if my aspect?
感谢您的帮助, 埃里克
Thanks for your help, erik