【发布时间】:2014-09-19 06:36:49
【问题描述】:
我在 Camel 中使用 2.14.0 中的新 rest 组件,并使用以下配置:
DefaultCamelContext context = new DefaultCamelContext();
RestConfiguration rc = new RestConfiguration();
rc.setComponent("spark-rest");
rc.setPort(9091);
context.setRestConfiguration(rc);
在rest-dsl page 中,有一些参考资料显示了一种使用 fluent dsl 配置 rest 的方法,例如:
restConfiguration()
.component("restlet")
.host("localhost")
.port(portNum)
.bindingMode(RestBindingMode.auto);
但我似乎找不到合适的占位符添加到哪里。
简而言之,camel 文档显示了一种使用 fluent DSL 配置 Camel 上下文的方法,但我找不到在哪里/如何做。
【问题讨论】:
-
你的问题是什么?
标签: java rest apache-camel dsl