Spring security Spring MVC Spring安全性

Spring security Spring MVC Spring安全性,spring-security,Spring Security,web.xml: SpringMVC应用程序 index.jsp mvc调度器 org.springframework.web.servlet.DispatcherServlet 1. mvc调度器 / org.springframework.web.context.ContextLoaderListener 上下文配置位置 /WEB-INF/mvc-dispatcher-servlet.xml, /WEB-INF/spring-security.xml springSecurityFilte

web.xml


SpringMVC应用程序
index.jsp
mvc调度器
org.springframework.web.servlet.DispatcherServlet
1.
mvc调度器
/
org.springframework.web.context.ContextLoaderListener
上下文配置位置
/WEB-INF/mvc-dispatcher-servlet.xml,
/WEB-INF/spring-security.xml
springSecurityFilterChain
org.springframework.web.filter.DelegatingFilterProxy
springSecurityFilterChain
/*
spring security.xml


mvc dispatcher servlet.xml


/WEB-INF/pages/
.jsp
我犯了错误

严重:将上下文初始化事件发送到类org.springframework.web.context.ContextLoaderListener的侦听器实例时发生异常
org.springframework.beans.factory.BeanCreationException:创建名为“org.springframework.security.filterChainProxy”的bean时出错:指定了1个构造函数参数,但在bean“org.springframework.security.filterChainProxy”中找不到匹配的构造函数(提示:为简单参数指定索引/类型/名称参数以避免类型歧义)您不需要在contextConfiglocation中指定mvc-dispatcher-servlet.xml

<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
        /WEB-INF/mvc-dispatcher-servlet.xml,
        /WEB-INF/spring-security.xml
    </param-value>
</context-param>

上下文配置位置
/WEB-INF/mvc-dispatcher-servlet.xml,
/WEB-INF/spring-security.xml

它解决了你的问题

你确定异常是说
org.springframework.security.filterChainProxy
而不是
org.springframework.security.web.filterChainProxy
?@daniya它的过滤链代理..我的意思是,异常应该是说
org.springframework.security.web.filterChainProxy
,但是您编写了
org.springframework.security.filterChainProxy
。是打字错误吗?