码迷,mamicode.com
首页 > 移动开发 > 详细

Struts 2.x 与Spring4.x整合出现:No mapping found for dependency [type=java.lang.String, name='actionPackages...

时间:2014-07-10 10:51:14      阅读:261      评论:0      收藏:0      [点我收藏+]

标签:style   blog   java   color   strong   cti   

Struts2.16与Spring4.x整合出错:

Caused by: java.lang.RuntimeException: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name=‘actionPackages‘] in public void org.apache.struts2.config.ClasspathPackageProvider.setActionPackages(java.lang.String).

解决方案-->在web.xml中的struts filter加上actionPackages 如下所示:

<filter>
        <filter-name>struts2</filter-name>
        <filter-class>
            org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
     </filter-class> <init-param> <param-name>actionPackages</param-name> <param-value>com.logo.group.webapp.action,com.logo.group.harvest.action</param-value> </init-param> </filter>

 

 

Struts 2.x 与Spring4.x整合出现:No mapping found for dependency [type=java.lang.String, name='actionPackages...,布布扣,bubuko.com

Struts 2.x 与Spring4.x整合出现:No mapping found for dependency [type=java.lang.String, name='actionPackages...

标签:style   blog   java   color   strong   cti   

原文地址:http://www.cnblogs.com/Richard-xie/p/3812323.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!