我有一个多模块maven应用程序,有两个子模块。一个模块用于Web服务,另一个模块将是使用这些服务的模拟器。maven和spring应用程序部署错误:找不到名称空间的NamespaceHandler [http://www.springframework.org/schema/context]
我有一个奇怪的问题,当我想部署我的应用程序,这是我昨天开始,我已在从Tomcat7以下错误:
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate NamespaceHandler for namespace [http://www.springframework.org/schema/context]
Offending resource: ServletContext resource [/WEB-INF/application-context.xml]
我的应用程序context.xmls顶部看起来是这样的:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<context:component-scan base-package="com.company">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>
它说它找不到春天上下文的命名空间处理程序。但是我有一个这样在我父母的pom.xml这种依赖性:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.1.2.RELEASE</version>
</dependency>
我还可以看到,在Tomcat的web应用程序也有应用程序的lib文件夹春天上下文罐子。我一直在搜索两个小时左右,所以任何帮助将不胜感激。
感谢
“我的应用程序context.xmls顶部看起来是这样的:”是你的文件实际上是称那还是一个错字?如果是这样,请将其更改为.xml – david99world 2012-08-16 13:07:15
其错字,但谢谢。配置有什么奇怪的情况? – LostMohican 2012-08-16 14:44:14