gpt4 book ai didi

java - Camel Rest DSL 删除另一条额外路线

转载 作者:行者123 更新时间:2023-12-02 01:50:30 25 4
gpt4 key购买 nike

我正在基于 REST DSL 在 Camel 上构建一条 REST 路由。例如,根据配置,其余路由使用直接组件。

休息路线

rest("resturi")
.post()
.to(direct:inbox);

resturi is dynamic

from(direct:inbox)
.process(camelprocessor)
.to(queue);

有什么方法可以删除直接组件并合并为一条路线。

非常感谢有关上述内容的任何建议。

最佳答案

您可以通过添加.route()来做到这一点

.post().route().process(camelprocessor).to(queue);

但从功能可重用的角度考虑,直接组件将是最好的选择。

关于java - Camel Rest DSL 删除另一条额外路线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53051775/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com