Reputation: 53
I have a property PFlow_XXXX="some value"
defined which is read using camel property placeholder. Inside the processor, the property value is constructed by extracting the xxx value
from file name.Now when I try to get the value of this property inside the processor like this
exchange.getContext().resolvePropertyPlaceholders("{{xsdPathVar}}"));
where String xsdPathVar = "PFlow_"+extracting from file
.
But this is not working. Can some one help me how to read the property value from a string variable.
Upvotes: 0
Views: 501
Reputation: 1537
When using propertyPlaceholder
you can inject your properties in beans by using the @PropertyInject
annotation:
@PropertyInject(value = "xsdPathVar")
String xsdPathVar;
Public class MyProcessor implements Processor {
...
}
I'm not entirely sure if this is what you're asking for?
Upvotes: 1