Monday, June 20, 2011

Spring with external configuration

org.springframework.beans.factory.config.PropertyPlaceholderConfigurer is well known for configuring external properties.
What may be less known is how to define default values.

1. Setting the values on the PropertyPlaceholderConfigurer
 


file://${system.properties.pointing.to.config.dir}/config.xml





42





2. Setting the value on the bean
 


file://${system.properties.pointing.to.config.dir}/config.xml







No comments:

Post a Comment