Reputation: 504
I have a property file and I want to transform it to a java object that will be used in java components across all flows. What is the best approach for this in Mule CE 3.4
Upvotes: 0
Views: 900
Reputation: 3763
Add property resolver to your configuration. It is mostly done in applicationContext.xml. I am not sure if it is same in your configuration.
<context:property-placeholder location="classpath:yourfile.properties" />
Then, your properties can be resolved in your beans with the help of @Value
annnotation.
@Value("${PropertyName}")
private String propertyValue,
//Setter getter
Upvotes: 3