错误
rg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'treeMenuDao' defined in ServletContext resource [/WEB-INF/dataAccessContext-local.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.sunyard.zj.dao.ibatis.TreeMenuDaoImpl]: Constructor threw exception; nested exception is java.lang.NullPointerException
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.sunyard.zj.dao.ibatis.TreeMenuDaoImpl]: Constructor threw exception; nested exception is java.lang.NullPointerException
Caused by: java.lang.NullPointerException
原来用的struts2 2.0.11 版本 最近说有漏洞要升级,结果升级了就报错,用的strunts+spring+ibatis. 网上找了好多解决办法都是对于hibernate的。求大神帮忙。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
在struts2 jar包下有一个default.properties文件(路径为:orgapachestruts2),里面是struts2一些默认配置,其中有一项配置是struts.enable.DynamicMethodInvocation,作用是动态方法调用,为true时,就可以在struts.xml配置“*”的通配符,来调用action里的方法,在2.3.15版本之前都是默认为true
而到了2.3.16之后就默认设置为false了
这样就不能使用通配的方式调用action里的方法,如果想使用通配符来调用action里的方法的话需要在struts.xml里把struts.enable.DynamicMethodInvocation设置为true.
在struts.xml里添加如下配置:<constant name="struts.enable.DynamicMethodInvocation"value="true"></constant>
这样就可以了。
评论
全部评论 (0)