struts2+spring3后 报错comopensymphonyxwork2springSpringObjectFactory.java:209:-1

mac2022-06-30  70

在struts2项目的基础上,添加spring框架。我出问题的原因很简单,是web.xml上没有配置spring,添加如下代码即可。

    <context-param>         <param-name>contextConfigLocation</param-name>         <param-value>/WEB-INF/classes/applicationContext.xml</param-value>    </context-param>        <listener>        <listener-class>            org.springframework.web.context.ContextLoaderListener        </listener-class>    </listener>

转载于:https://www.cnblogs.com/javaYan/archive/2012/11/17/2774778.html

最新回复(0)