I like to use Spring framework's PropertyPlaceholderConfigurer to link to a .properties file to access my application configuration.
However, if a properties entry is missing from properties file, you will get BeanDefinitionStoreException. This is reasonable in most of time. But sometime you will just want to set some default value for certain entry (i.e. new entry that only applicable for new version and you want it to be backward compatible with old version configuration file).
For those scenarios, default value is supported by PropertyPlaceholderConfigurer as well by its setProperties(Properties props) method. Below is how it will look like:
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">