BeforeAdvice:
MethodBeforeAdvice 中有before作为回调,主要就是这个before方法,我们来看看before方法
@Override
public void before(Method method, Object[] args, @Nullable Object target) throws Throwable {
invokeAdviceMethod(getJoinPointMatch(), null, null);
}
before方法的实现在Advice中被配置到目标方法后,会在调用目标方法时被回调.具体的调用参数
Method对象:目标方法的反射对象
Object[]:对象数组,这个对象数组,这个对象数组中包含目标方法的输入参数.
例:CountingBeforeAdvice看这个参数
afterReturningAdvice:
ThrowsAdvice:异常的次数