Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 Camel 的新手,我仍在学习它,据我了解,您可以在 Spring DSL 中做与 Java DSL 相同的事情。我想知道的是你如何将一个转换为另一个?我经常看到 Java 中的一些例子,但我想
Java DSL基本上和之间的区别在于Spring XML,第一个是通过方法完全用Java语言RouteBuilder#configure()编写的,第二个是用XML. 你可以使用 ANY 来实现你需要的东西。在某些情况下Java DSL更多clean,而在其他情况下XML配置文件可能更可取。
Java DSL
Spring XML
Java
RouteBuilder#configure()
XML
clean
这里是 Java DSL 的例子,而这里是 Spring XML。