我正在尝试从jointCut 访问自定义注释值。但我找不到办法。
我的示例代码:
@ComponentValidation(input1="input1", typeOfRule="validation", logger=Log.EXCEPTION)
public boolean validator(Map<String,String> mapStr) {
//blah blah
}
试图访问@Aspect
类。
但是,我没有看到任何访问值的范围。
我尝试访问的方式如下代码
CodeSignature codeSignature = (CodeSignature) joinPoint.getSignature();
String[] names = codeSignature.getParameterNames();
MethodSignature methodSignature = (MethodSignature) joinPoint.getStaticPart().getSignature();
Annotation[][] annotations = methodSignature.getMethod().getParameterAnnotations();
Object[] values = joinPoint.getArgs();
我没有看到任何值返回 input = input1。如何实现这一目标。