为什么spring ioc+struts 2在添加了spring security 3支持后不能工作

为什么spring ioc+struts 2在添加了spring security 3支持后不能工作,spring,struts2,spring-security,web.xml,Spring,Struts2,Spring Security,Web.xml,在我将以下内容添加到web.xml中以支持SpringSecurity3之后。spring ioc+struts2不起作用,当struts2指向一个bean时,系统无法在applicationContext.xml中搜索bean定义,它只是向我显示未定义的类 <context-param> <!-- Defines definition file for security setting. --> <param-name>contextCo

在我将以下内容添加到web.xml中以支持SpringSecurity3之后。spring ioc+struts2不起作用,当struts2指向一个bean时,系统无法在applicationContext.xml中搜索bean定义,它只是向我显示未定义的类

<context-param>
     <!-- Defines definition file for security setting. -->
     <param-name>contextConfigLocation</param-name>
     <param-value>classpath:app-security.xml</param-value>
    </context-param>

    <!-- Bootstraps the Spring root web application context before servlet initialization -->
    <!-- The following code defines filter for Spring Security -->
    <listener>
         <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <filter>
         <filter-name>springSecurityFilterChain</filter-name>
         <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    </filter>
    <filter-mapping>
         <filter-name>springSecurityFilterChain</filter-name>
         <url-pattern>/*</url-pattern>
    </filter-mapping>

请帮忙!提前谢谢

听起来你好像忘了添加一些需要的罐子。确保您和类加载器可以找到它说缺少的类。提示:它可能是Spring安全jar的一个。

但是如果我在web.xml中删除这些配置,一切都会正常工作。因此不会出现jar丢失的问题。您可以在类路径上列出Spring*jar吗?您使用的是依赖关系管理系统吗?例如Maven/IvyNo,我们只是在构建路径中包含所有*.jar,如果这是jar的问题,那么一旦我删除web.xml中的配置,它就不应该工作了,对吗?但实际上它是有效的!你需要提供更多的细节。