5
如何从ProceedingJoinPoint获取方法的注释值?
我有以下注释。 MyAnnotation.java @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface MyAnnotation { } SomeAspect.java public class SomeAspect{ @Around("execution(public * *(..)) && @annotation(com.mycompany.MyAnnotation)") public Object procede(ProceedingJoinPoint call) throws Throwable { //Some logic } } SomeOther.java public class SomeOther{ @MyAnnotation("ABC") public String someMethod(String name){ } } 在上课中,@MyAnnotation中传递了“ ABC ” 。现在如何在SomeAspect.java类的处理方法中访问“ ABC ”值? 谢谢!