The XProperties system (Introduction in XProperties Tutorial) offers enhancements to the standard Java properties as:
Include mechanism to load multiple files in one application property set
Prefixes to shorten the key text
References in values to other properties
Conditional value setting (often used for different environments specific settings)
Timer driven value reloading
Enumerated groups of keys
Reading properties form databases
If you want to use to XProperties in applicationContext.xml, you can simply activate a Spring property placeholder configurer:
<bean class="org.openxma.dsl.platform.config.XPropertiesPlaceholderConfigurer" />
Then, you can refer to XProperty entries with Expression Language syntax. The following sets the property myProperty of the instance of MyTestingBean to the value of the at.spardat.sample.hello property.
<bean class="org.openxma.demo.customer.MyTestingBean" p:myProperty="${at.spardat.sample.hello}" />
This mechanism can be used e.g. to externalize DB passwords from applicationContext.xml file.