我正在基于 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/