263.12. 예제

속성 자리 표시자를 끝점에서 직접 사용할 수도 있습니다.You can also use property placeholders directly in the endpoint uris without having to use properties:.

// properties
cool.foo=result

// route
from("direct:start").to("mock:{{cool.foo}}");

원하는 대로 여러 곳에서 사용할 수 있습니다.

// properties
cool.start=direct:start
cool.showid=true
cool.result=result

// route
from("{{cool.start}}")
    .to("log:{{cool.start}}?showBodyType=false&showExchangeId={{cool.showid}}")
    .to("mock:{{cool.result}}");

ProducerTemplate을 사용할 때 속성 자리 표시자를 사용할 수도 있습니다.You can also your property placeholders when using ProducerTemplate for example:

template.sendBody("{{cool.start}}", "Hello World");