如何将 Apache Camel 平台-http 与 Spring Boot 结合使用?

问题描述 投票:0回答:1

在我看来,Apache Camel 文档没有提供有关如何将 Apache Camel 平台-http 与 Spring Boot 一起使用的复杂信息。

例如这条路线

 from("platform-http:/test?httpMethodRestrict=POST")
     .to("log:foo");

我遇到了

原因:java.lang.IllegalStateException:PlatformHttpEngine既未在此端点上设置,也未在Camel注册表或FactoryFinder中找到。

这里没有记录如何指定这样的 PlatformHttpEngine,读起来就好像它是开箱即用的

https://camel.apache.org/components/3.18.x/platform-http-component.html

java spring spring-boot rest apache-camel
1个回答
0
投票

我认为这也很令人困惑,我的第一次尝试也是使用

platform-http

然后我发现有一个

rest
组件:https://camel.apache.org/components/3.18.x/rest-component.html

要在Camel上完整设置REST组件,请参考这个答案:https://stackoverflow.com/a/28084154/19589355

© www.soinside.com 2019 - 2024. All rights reserved.