It is sometimes usefull to get a property from a java.util.Properties and you can not use the PropertyPlaceholderConfigurer. Such a situation can happen for example when a direct or indirect reference will come from a PropertyPlaceholderConfigurer/PropertyOverrideConfigurer. In that case the only solution )I see and found also on the forums) is to create a child context. An example of this situation can be sean at
http://forum.springframework.org/showthread.php?t=15583.
To be able to handle such a situation in one context and still be able to read the database setting from a properties file the values can be read from the properties by using MethodInvokingFactoryBean. The problem is that the configuration is too verbose for just retriving one value and that the class is to "heavy" fro this purpose.
So, my sugestion is to have a FactoryBean that can be used in the same manner as FieldRetrievingFactoryBean and using the name to specify the property object and static key. e.g.:
<bean name="myProperties[myKey]" class="org.springframework.beans.factory.config.PropertiesGetterFactoryBean"/>
In that case the value can be refered with something like ref="myProperties[myKey]"
I already have such a factory bean + JUnit and I can donate it.