Reputation: 1391
I know I can use property component to read properties for apache camel specific implementations but do camel also provide some syntax to use same syntax OR fetch properties to use for plain java code For example:
For camel specific code I can use like this :
camelCtx.getEndpoint(Constants.URI+"&partitioner={{partitioner.class}}&serializerClass={{serializer.class}}");
Now how can I use same properties for my plain java code e.g:
Properties props = new Properties();
props.setProperty("metadata.broker.list",{{metadataBrokerList}});
Upvotes: 0
Views: 619
Reputation: 55760
See the resolovePropertyPlaceholders
method on CamelContext
which can do this: http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/CamelContext.html#resolvePropertyPlaceholders(java.lang.String)
Upvotes: 1