无法找到春天NamespaceHandler
问题描述:
我正在creteing Maven的项目,我得到了一些错误,IM amntn下面无法找到春天NamespaceHandler
无法找到春天NamespaceHandler
org.springframework.web.context.ContextLoader initWebApplicationContext: Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]
Offending resource: ServletContext resource [/WEB-INF/applicationContext.xml]
答
你需要添加spring-security-config
依赖关系到你的pom.xml
,你可以在下面找到它。你也可以参考4.2.3.RELEASE
,但你只需要使用符合您的另一弹簧版本哪个版本,你可以找到它形成以下链接:
https://mvnrepository.com/artifact/org.springframework.security/spring-security-config
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>3.0.1.RELEASE</version>
</dependency>