Struts 2.x 与Spring4.x整合出现:No mapping found for dependency [type=java.lang.String, name='actionPackages...
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>
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。