PDA

View Full Version : Populating java.util.Properties from properties file.



kkk
Sep 6th, 2004, 09:54 AM
I am trying to populate java.util.Properties from properties file, but I do not know how. I am trying to do something like this:

<bean id="ttt" class="com.foo.bar">
<property name="properties">
<props>
<value>classpath:test.properties</value>
</props>
</property>
</bean>

gpoirier
Sep 6th, 2004, 10:14 AM
You can do this:



<bean id="ttt" class="com.foo.bar">
<property name="properties">
<bean class="org.springframework.beans.factory.config.Propertie sFactoryBean">
<property name="location">
<value>classpath&#58;test.properties</value>
</property>
</bean>
</property>
</bean>