Hi,
thanks for the replies... sorry, I didn't explain myself properly.
I basically want to have placeholders within my property files....
and have Spring inject a java.util.Properties instance into a class.
I've tried this approach below, but when I iterate through the java.utils.Properties object that is passed to "DisplayProps".... the values of "jdbc.link.url" and "jdbc.other.url" are not replaced, ie. I get the placeholders not the values.
regards,
Owen
Code:
# properties
jdbc.base.url=jdbc:oracle:thin:@127.0.0.1:1521:MYSID
jdbc.link.url=${jdbc.base.url}
jdbc.other.url=${jdbc.base.url}
# bean definitions
<beans>
<bean id="props" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="location" value="classpath:TestSpring.properties"/>
</bean>
<bean id="DisplayProps" class="DisplayProps">
<property name="properties" ref="props"/>
</bean>
</beans>