Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/util]
Offending resource: class path resource [appcontext.xml]
上网一顿搜索
发现有童鞋跟我遇到一样的问题:
http://chenzhou123520.iteye.com/blog/1971322
http://iteches.com/archives/34439
我的Spring配置文件头文件如下:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.0.xsd">
然后打好的jar包 META-INF下果然发现spring.handlers和spring.schemas
我将spring.handlers解压出来,打开一看,,里面只有1行
http\://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler
很明显,我的头文件中用了util这玩意,,so,,我在下面加了一行
http\://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler
让保存,,替换到jar中..重启,,问题解决!!!