around拦截器:
package com.zjm.study.advice;import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;public class aroundAdvice implements MethodInterceptor { public Object invoke(MethodInvocation arg0) throws Throwable {
// TODO Auto-generated method stub
Object obj = arg0.proceed();
return null;
}} <bean id="aroundAdvice" class="com.zjm.study.advice.aroundAdvice" /> <--省略部分....--> <property name="interceptorNames">
<list>
<value>aroundAdvice</value>
</list>
</property>
运行时,控制台报错:
Exception in thread "main" java.lang.NullPointerException
at test.main(test.java:34)
请问怎么回事
package com.zjm.study.advice;import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;public class aroundAdvice implements MethodInterceptor { public Object invoke(MethodInvocation arg0) throws Throwable {
// TODO Auto-generated method stub
Object obj = arg0.proceed();
return null;
}} <bean id="aroundAdvice" class="com.zjm.study.advice.aroundAdvice" /> <--省略部分....--> <property name="interceptorNames">
<list>
<value>aroundAdvice</value>
</list>
</property>
运行时,控制台报错:
Exception in thread "main" java.lang.NullPointerException
at test.main(test.java:34)
请问怎么回事
解决方案 »
- java.lang.ClassNotFoundException: com.opensymphony.xwork2.util.TextUtils
- 我们爱分享---最常见面试题(SSH方面)《二》
- 用webservice为什么会更有效率?如果项目都在一个服务器下
- limitclear这种人也配当程序员?4
- 二进制转换
- struts utf-8乱码
- weblogic 8.1 连接池泄漏问题
- 最近朋友给了个工程,不知道如何部署!盼解决
- 初学问题:如何在struts下进行数据库操作?
- Could not bind factory to JNDI?
- webservice 创建Client问题
- java中利用反射得到的方法怎么调用??
用spring的aop实现around拦截器很简单,可以去查一下spring2.5的中文帮助
请问大侠,能给个明确的指点吗,应该换什么套路
因为没再工作中用过,处于学习ssh阶段,所以有点晕
还有,spring2.5中文帮助......
哪里有下载啊,我找过,没找到啊
return obj ; //这个地方 return一下
http://wiki.redsaga.com/confluence/display/Spring2/Spring2.5看一下核心技术--使用Spring进行面向切面编程(AOP) 章节