Apache camel XML路由配置 - 继承常用参数

时间:2017-12-13 11:35:27

标签: xml configuration apache-camel

鉴于我有一个使用XML配置的传统Camel应用程序,我有许多具有通用参数的路由。 E.g。

<camel:camelContext>
<camel:endpoint id=sampleEndpoint1" uri="user1@host.com/inbound?password=password1&amp;readLock=none&amp;delete=true&amp;include=.*.xml&amp;disconnect=false&amp;knownHostsFile=/tmp/known_hosts&amp;serverAliveInterval=30&amp;preferredAuthentications=password&amp;ciphers=arcfour128,aes128-ctr,aes192-ctr,aes256-ctr"/>

<camel:endpoint id=sampleEndpoint2" uri="user2@host.com/inbound?password=password2&amp;readLock=none&amp;delete=true&amp;include=.*.xml&amp;disconnect=false&amp;knownHostsFile=/tmp/known_hosts&amp;serverAliveInterval=30&amp;preferredAuthentications=password&amp;ciphers=arcfour128,aes128-ctr,aes192-ctr,aes256-ctr"/>

<camel:endpoint id=sampleEndpoint3" uri="user3@host.com/inbound?password=password3&amp;readLock=none&amp;delete=true&amp;include=.*.xml&amp;disconnect=false&amp;knownHostsFile=/tmp/known_hosts&amp;serverAliveInterval=30&amp;preferredAuthentications=password&amp;ciphers=arcfour128,aes128-ctr,aes192-ctr,aes256-ctr"/>
</camel:camelContext>

密码参数后,路径定义中的所有其余参数都相同。

路由是否有办法以类似于Spring bean配置的方式继承公共参数,您可以从 bean继承属性?

0 个答案:

没有答案