开发者

Using Apache Camel and Spring, can I build uri using properties?

开发者 https://www.devze.com 2023-03-09 01:50 出处:网络
I have created my own component and I want to do something similar to this: <camel:camelContext id=\"camel1\">

I have created my own component and I want to do something similar to this:

<camel:camelContext id="camel1">
    <camel:route>
        开发者_开发技巧<camel:from uri="mysch://realthing?network=${network}" id="testEndpoint"/>

I want ${network} to come from a properties file (using Spring properties placeholder):

<context:property-placeholder location="classpath:test.properties"/>

How can I do that?


See this FAQ http://camel.apache.org/how-do-i-use-spring-property-placeholder-with-camel-xml.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号