Caused by: org.nutz.ioc.ObjectLoadException: Object 'logInterceptor' without define!
at org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:174) ~[nutz-1.r.59.jar:?]
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:180) ~[nutz-1.r.59.jar:?]
... 34 more
下面是声明的方法
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.aop.InterceptorChain;
import org.nutz.aop.MethodInterceptor;
@IocBean //声明为一个Ioc的bean,名字为logInterceptor
public class LogInterceptor implements MethodInterceptor {
public void filter(InterceptorChain chain) throws Throwable {
System.out.println("方法即将执行 -->" + chain.getCallingMethod());
chain.doChain();// 继续执行其他拦截器
System.out.println("方法执行完毕 -->" + chain.getCallingMethod());
}
}