跟老师演示结果有点出入?问题出在哪儿呢?方法拦截类代码: System.out.println("AopMethodInterceptor : invoke 1 "+ invocation.getMethod().getName()+ " "+invocation.getStaticPart().getClass().getName()); Object object = invocation.proceed(); System.out.println("AopMethodInterceptor : invoke 2 "+ object); return object;执行结果:log4j:WARN No appenders could be found for logger (org.springframework.core.env.StandardEnvironment).log4j:WARN Please initialize the log4j system properly.AopBeforeAdvice : Method save org.aop.api.BizLogicImplAopMethodInterceptor : invoke 1 save java.lang.reflect.MethodBizLogicImpl:save successAopAfterReturningAdvice:afterReturning()save org.aop.api.BizLogicImpl BizLogicImpl:save()AopMethodInterceptor : invoke 2 BizLogicImpl:save()
添加回答
举报
0/150
提交
取消