[英]Camel convert Java DSL to Spring DSL
I'm new to Camel and I'm still learning about it and from my understanding you can do the same things in Spring DSL as Java DSL. 我是Camel的新手,我仍在学习它,据我了解,您可以在Spring DSL中完成与Java DSL相同的操作。 What I'm wondering is how do you convert one to the other?
我想知道的是如何将一个转换为另一个? Often I see examples of things in Java but want to
我经常看到Java中的事例,但我想
Basically the difference between Java DSL
and Spring XML
is that first is written completely in Java
language through RouteBuilder#configure()
method and second is written in XML
. 基本上,
Java DSL
和Spring XML
之间的区别是,首先是通过RouteBuilder#configure()
方法完全用Java
语言编写的,其次是使用XML
编写的。 You can use ANY to achieve things you need. 您可以使用ANY来实现所需的功能。 In some cases
Java DSL
is more clean
, while in other cases XML
configuration file could be preferable. 在某些情况下,
Java DSL
更clean
,而在其他情况下, XML
配置文件可能更可取。
Here is the example of Java DSL, while here is Spring XML. 这是Java DSL的示例,而这是Spring XML。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.