cvc-complex-type.2.4.c:匹配的通配符很严格,但是找不到元素'jaxrs:server'的声明

时间:2018-09-19 13:19:36

标签: spring cxf

我正在尝试在cxf-servlet.xml中使用apache cxf开发rest服务,但出现以下错误“ cvc-complex-type.2.4.c:匹配的通配符很严格,但是找不到用于元素“ jaxrs:server”。”在第16行

        <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:core="http://cxf.apache.org/core"
        xmlns:jaxrs="http://cxf.apache.org/jaxrs"
        xmlns:aop="http://www.springframework.org/schema/aop"
        xmlns:mvc="http://www.springframework.org/schema/mvc"
        xmlns:beans="http://cxf.apache.org/configuration/beans"
        xsi:schemaLocation="http://cxf.apache.org/configuration/beans 
        http://cxf.apache.org/schemas/configuration/cxf-beans.xsd
        http://cxf.apache.org/core 
        http://cxf.apache.org/schemas/core.xsd
        http://www.springframework.org/schema/mvc 
        http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
        http://www.springframework.org/schema/beans 
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/aop 
        http://www.springframework.org/schema/aop/spring-aop-4.3.xsd
        http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs- 
        common.xsd">

       <jaxrs:server id="example" address="/emp">
        <jaxrs:serviceBeans>
            <bean class="tk.learntosuccess.EmployeeServicesImpl" />
        </jaxrs:serviceBeans>
       </jaxrs:server>

    </beans>

0 个答案:

没有答案