Apache camel 不使用spring的apache camel cxfrs的简单绑定

Apache camel 不使用spring的apache camel cxfrs的简单绑定,apache-camel,cxfrs,Apache Camel,Cxfrs,我想使用camel的cxfrs模块提供的简单绑定,而不使用spring。apache网站上给出的示例使用spring。 有人能解释一下如何在不使用spring的情况下使用简单绑定吗?如果不使用spring,很难在cxfrs端点上配置所有内容。 但是,您可以通过使用uri选项(如 from("cxfrs://http://localhost:9000/context/rest?resourceClasses=org.apache.camel.component.cxf.jaxrs.testbean

我想使用camel的cxfrs模块提供的简单绑定,而不使用spring。apache网站上给出的示例使用spring。
有人能解释一下如何在不使用spring的情况下使用简单绑定吗?

如果不使用spring,很难在cxfrs端点上配置所有内容。 但是,您可以通过使用uri选项(如

from("cxfrs://http://localhost:9000/context/rest?resourceClasses=org.apache.camel.component.cxf.jaxrs.testbean.CustomerServiceResource&bindingStyle=SimpleConsumer")
您可以使用JavaDSL(域特定语言)。例如(在RouteBuilder的配置方法中):


Camel版本是2.16.2(maven:org.apache.Camel:Camel-cxf-transport:2.16.2)cxf版本是3.1.4(org.apache.cxf:cxf-rt-transports-http-jetty:3.1.4)

我没有找到任何关于这方面的文档,我只是查找了“cxfrscomponent”和“CxfRsEndpoint”并进行了实验
CxfRsComponent cxfComponent = new CxfRsComponent(context);
CxfRsEndpoint serviceEndpoint = new CxfRsEndpoint("http:/localhost/rest", cxfComponent);
serviceEndpoint.addResourceClass(MyService.class);

from(serviceEndpoint).log("this is irrelevant");