java - Apache Camel 使用 Apache Camel 的 Spring WebFlux 功能性 Web Rest API

标签 java spring-boot apache-camel spring-webflux

我使用 spring WebFlux 定义了一个功能性 Web Rest api (GET),它在我的 WebClientTest 中运行良好

我有 apache Camel 路线,它有一个工作路线来读取文件内容并将该数据发送到上面的其余 api,如

        .routeId("fromFileToRest”)
        .log("consume customer route started")
        .setHeader(Exchange.HTTP_METHOD, simple("GET"))
        .fromRest()
        .to(“http://localhost:8080/customer”).log(“sent consumer data to get api”); ```


But in this camel route, I want to replace hardcoded url in to() with the WebFlux functional api router/handler call, so that when there is a change in uri, this route is not impacted. Could you please suggest how to

最佳答案

可以在使用 HttpClient 的路由中添加 Camel 处理器,通过 prop 文件中的可配置 url 调用下游吗?

关于java - Apache Camel 使用 Apache Camel 的 Spring WebFlux 功能性 Web Rest API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58971162/

相关文章:

java - 哪种 Camel 构造适合转换?

java - 如何使用附加包扩展 BndTool 存储库?

java - Apache POI : changing CellType causes IllegalStateException

java - Seam/Hibernate - 获取 ORA 消息文本

angularjs - Spring Boot Web 应用程序中的 Angular 路由

ssl - 如何在服务组合中使用嵌入式 Active MQ Broker 为 Camel Route 设置 SSL?

java - Spring Boot - ErrorPageFilter 找不到 RequestDispatcher

java - Spring MVC Hello World 应用程序在 AWS elastic beanstalk 上出现 404 错误,在本地按预期运行

java - 带有 { } 大括号的 Spring MVC @Path 变量

ssl - Apache camel/MQTT 通过 SSL : Failed to create Producer for endpoint (java. lang.NullPointerException)