Spring框架学习[AOP通知以及编程式AOP ](九)
果方法只有一个参数 if (method.getParameterTypes().length == 1) { handlerArgs = new Object[] { ex }; } //获取方法的参数列表 else { handlerArgs = new Object[] {mi.getMethod(), mi.getArguments(), mi.getThis(), ex}; } try { //使用JDK反射机制,调用异常通知的异常处理方法 method.invoke(this.throwsAdvice, handlerArgs); } catch (InvocationTargetException targetEx) { throw targetEx.getTargetException(); } } }