cxf之org.xml.sax.SAXParseException; lineNumber: 7; columnNumber: 37; cvc-complex-type.2.4.c: 通配符的匹配很全面, 但无法找到元素 'jaxws:server' 的声明。

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

将最后jaxrs-common.xsd改为jaxrs.xsd

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

  

再次启动,Caused by: org.apache.cxf.service.factory.ServiceConstructionException: There is an endpoint already running on /rest.

原文地址:https://www.cnblogs.com/yadongliang/p/8179554.html