我想使用camel的cxfrs模块提供的简单绑定,而不使用spring。apache网站上给出的示例使用spring。http://camel.apache.org/cxfrs.html可以解释如何使用没有spring的简单绑定吗?
发布于 2016-03-12 13:23:48
您可以使用Java (领域特定语言)。一个示例(在RouteBuilder#configure方法中):
CxfRsComponent cxfComponent = new CxfRsComponent(context);
CxfRsEndpoint serviceEndpoint = new CxfRsEndpoint("http:/localhost/rest", cxfComponent);
serviceEndpoint.addResourceClass(MyService.class);
from(serviceEndpoint).log("this is irrelevant");Camel版本为2.16.2 (maven: org.apache.camel:camel- CXF -transport2.16.2)CXF版本为3.1.4 (org.apache.cxf:cxf-rt-transports-http-jetty:3.1.4)。
发布于 2014-09-28 01:46:45
如果不使用Spring,很难配置cxfrs端点上的所有东西。但是您可以使用uri选项来完成cxfrs的大部分配置,例如
from("cxfrs://http://localhost:9000/context/rest?resourceClasses=org.apache.camel.component.cxf.jaxrs.testbean.CustomerServiceResource&bindingStyle=SimpleConsumer")https://stackoverflow.com/questions/25942515
复制相似问题