public class MyMethodInterceptor implements MethodInterceptor{
@Override
public Object intercept(Object arg0, Method arg1, Object[] arg2,
MethodProxy arg3) throws Throwable {
return null;
}
实现 MethodInterceptor接口后,书上的重写方法是
public Object invoke( MethodInvocation invocation)throws Th
rowable 为什么两个不一样,,spring的版本不同吗,,
实现错接口了吧,org.aopalliance.intercept.Methodinterceptor 应该实现这个aopalliance的接口
书上面就是实现这个借口的哦,,然后重写public Object invoke( MethodInvocation invocation)throws Throwable 方法
回答
恩,你看看你的接口是这个么?我记得有好几个接口名字都叫Methodinterceptor,但是包不同的,你仔细看看哦