10
考慮我已經定義了以下方面的參數:Spring AOP的:獲取切入點註解
@Aspect
public class SampleAspect {
@Around(value="@annotation(sample.SampleAnnotation)")
public Object display(ProceedingJoinPoint joinPoint) throws Throwable {
// ...
}
}
和註釋
public @interface SampleAnnotation {
String value() default "defaultValue";
}
有沒有辦法讀取註釋SampleAnnotation參數的值在顯示方法,如果我的方面?
感謝您的幫助, 埃裏克
[訪問註解值的建議](http://stackoverflow.com/questions/5026247/accessing-annotation-value-in-advice) – axtavt 2011-03-12 11:45:37