Java Camel 2.14.0中的Fluent Rest配置

Java Camel 2.14.0中的Fluent Rest配置,java,rest,apache-camel,dsl,Java,Rest,Apache Camel,Dsl,我在Camel中使用2.14.0中的新rest组件,并使用以下配置: DefaultCamelContext context = new DefaultCamelContext(); RestConfiguration rc = new RestConfiguration(); rc.setComponent("spark-rest"); rc.setPort(9091); context.setRestConfiguration(rc); 在中,有一些参考资料显示了使用fluent dsl

我在Camel中使用2.14.0中的新rest组件,并使用以下配置:

DefaultCamelContext context = new DefaultCamelContext();

RestConfiguration rc = new RestConfiguration();
rc.setComponent("spark-rest");
rc.setPort(9091);
context.setRestConfiguration(rc);
在中,有一些参考资料显示了使用fluent dsl配置rest的方法,如:

restConfiguration()
 .component("restlet")
 .host("localhost")
 .port(portNum)
 .bindingMode(RestBindingMode.auto);
但我似乎找不到合适的占位符来添加这个


简而言之,camel文档展示了一种使用fluentdsl配置camel上下文的方法,但我找不到在哪里/如何进行配置

最后,找到正确放置此部件所需的火花。这在route builder配置方法中

protected RouteBuilder createRouteBuilder() throws Exception {
  return new RouteBuilder() {
    public void configure() throws Exception {
      restConfiguration()
      .component("spark-rest")
      .port(9091);

你的问题是什么?