首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >不使用spring的apache骆驼cxfrs的简单绑定

不使用spring的apache骆驼cxfrs的简单绑定
EN

Stack Overflow用户
提问于 2014-09-19 21:19:18
回答 2查看 605关注 0票数 0

我想使用camel的cxfrs模块提供的简单绑定,而不使用spring。apache网站上给出的示例使用spring。http://camel.apache.org/cxfrs.html可以解释如何使用没有spring的简单绑定吗?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2016-03-12 13:23:48

您可以使用Java (领域特定语言)。一个示例(在RouteBuilder#configure方法中):

代码语言:javascript
复制
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)。

票数 1
EN

Stack Overflow用户

发布于 2014-09-28 01:46:45

如果不使用Spring,很难配置cxfrs端点上的所有东西。但是您可以使用uri选项来完成cxfrs的大部分配置,例如

代码语言:javascript
复制
from("cxfrs://http://localhost:9000/context/rest?resourceClasses=org.apache.camel.component.cxf.jaxrs.testbean.CustomerServiceResource&bindingStyle=SimpleConsumer")
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25942515

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档