无法在终端中找到XML架构命名空间错误的Spring NamespaceHandler

Sur*_*non 5 java eclipse spring spring-mvc

在运行时,我的代码,在终端上,它给出了这个错误

线程"main"中的异常java.lang.RuntimeException:org.springframework.beans.factory.parsing.BeanDefinitionParsingException:配置问题:无法找到XML架构命名空间的Spring NamespaceHandler [http://cxf.apache.org/core]

违规资源:类路径资源[META-INF/test.xml]

我的test.xml文件是

<?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" 
    xmlns:cxf="http://cxf.apache.org/core"
    xsi:schemaLocation="http://www.springframework.org/schema/beans     http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
     http://www.springframework.org/schema/context  http://www.springframework.org/schema/context/spring-context-3.0.xsd
    http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd">


    <bean id="clientI"
        class="LI" />
    <bean id="clientL"
        class="LIn" />

        <cxf:bus>
        <cxf:outInterceptors>
            <ref bean="clientI" />
        </cxf:outInterceptors>
        <cxf:inInterceptors>
            <ref bean="clientL" />
        </cxf:inInterceptors>
    </cxf:bus>
</beans>
Run Code Online (Sandbox Code Playgroud)

但是相同的代码在eclipse中有效.有谁知道问题可能是什么?

Sur*_*non 3

出现此问题是因为我的类路径中不存在 cxf-bundle JAR

您可以从这里获取它:http://mvnrepository.com/artifact/org.apache.cxf/cxf-bundle/2.7.6(最新版本)。