Rest 阿帕奇骆驼cxfrs—;Can';找不到对<;URL>;观察者

Rest 阿帕奇骆驼cxfrs—;Can';找不到对<;URL>;观察者,rest,apache-camel,jax-rs,cxfrs,Rest,Apache Camel,Jax Rs,Cxfrs,我试图开发一个rest服务,并通过ApacheCamel的CXFRS公开该服务。我遵循了中给出的所有步骤,并参考了给出的许多示例。我已经提到了这个问题,但就我而言,这只是一个简单的rest请求。下面是所使用的服务类、路由类和cxf上下文: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w

我试图开发一个rest服务,并通过ApacheCamel的CXFRS公开该服务。我遵循了中给出的所有步骤,并参考了给出的许多示例。我已经提到了这个问题,但就我而言,这只是一个简单的rest请求。下面是所使用的服务类、路由类和cxf上下文:

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

<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<context:annotation-config />

<!-- enable Spring @Component scan -->
<context:component-scan base-package="org.camelsample.rest" />

<cxf:rsServer id="rsServer" address="/rest"
    serviceClass="org.camelsample.rest.service.SampleRestService"
    loggingFeatureEnabled="true" loggingSizeLimit="20">
    <cxf:providers>
        <bean class="org.codehaus.jackson.jaxrs.JacksonJsonProvider" />
    </cxf:providers>
</cxf:rsServer>

<camel:camelContext id="samplerestservice"
    xmlns="http://camel.apache.org/schema/spring">
    <contextScan />
    <jmxAgent id="agent" createConnector="true" />
</camel:camelContext>

</beans>
路线类别:

package org.camelsample.rest.route;

import org.apache.camel.spring.SpringRouteBuilder;

public class SampleRestRoute extends SpringRouteBuilder {

    @Override
    public void configure() throws Exception {
        // TODO Auto-generated method stub
        from("cxfrs:bean:rsServer").log("Into Sample   Route").setBody(constant("Success"));
    }
}
但是,当我尝试使用点击并测试时,总是会收到以下错误消息:

2015-05-29 13:38:37.920  WARN 6744 --- [nio-8080-exec-2] o.a.c.t.servlet.ServletController        : Can't find the the request for http://localhost:8080/favicon.ico's Observer 
2015-05-29 13:38:40.295  WARN 6744 --- [nio-8080-exec-3] o.a.c.t.servlet.ServletController        : Can't find the the request for http://localhost:8080/rest's Observer 

我正在使用Spring boot测试rest示例。

它是否与此URL一起工作

http://localhost:8181/cxf/rest
如果您只是使用
address=“/rest”
作为您的地址,那么您可能会获得默认的Jetty端口
8181
和默认的CXF servlet路径
/CXF
作为基本URL

如果您特别想使用您提供的URL,请尝试以下方法:

address="http://0.0.0.0:8080/rest"

尝试了同样的方法,但仍然不起作用。抛出相同的错误我有一个类似的问题,它在没有结构的情况下工作,在结构的情况下失败。
address="http://0.0.0.0:8080/rest"