2017-08-29 158 views

回答

0

您是否尝试过HTTP4或HTTP? http://camel.apache.org/http4.html

+0

谢谢你是gogic。如果我以这种方式路由,从我的应用程序路由器中的(“direct:start”)。到(“http://services.groupkt.com/country/get/all”)不会触发Spring MVC应用程序。 – DevD

0

使用ProducerTemplate,它就像一个魅力调用外部端点REST,DB,SOAP等。

您可以自动装配它

@Autowired 
ProducerTempalete prodcuerTemplate 
prodcuerTemplate.sendBody("http://xyz...", "<hello>world!</hello>"); 

ProducerTemplate template = exchange.getContext().createProducerTemplate(); 

// send to default endpoint 
template.sendBody("<hello>world!</hello>"); 

// send to a specific queue 
template.sendBody("http://xyz...", "<hello>world!</hello>");