切面反射获取方法
作者:互联网
Signature sig = pjp.getSignature();
MethodSignature msig = null;
if (!(sig instanceof MethodSignature)) {
throw new IllegalArgumentException("该注解只能用于方法");
}
msig = (MethodSignature) sig;
Object target = pjp.getTarget();
Method currentMethod = target.getClass().getMethod(msig.getName(), msig.getParameterTypes());
标签:反射,getClass,target,MethodSignature,获取,sig,切面,msig,pjp 来源: https://www.cnblogs.com/yuhuameng/p/11167355.html