I am using Spring3
. I have below property
in one of the bean.
private Properties properties;
Here properties is util
package property
<bean id="properties" class="java.util.Properties">
<constructor-arg>
<props>
<prop key="id">${id}</prop>
<prop key="protocol">${protocol}</prop>
<prop key="username">${username}</prop>
<prop key="password">${password}</prop>
</props>
</constructor-arg>
</bean>
<bean id="propertyFactory"
class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="ignoreResourceNotFound" value="false" />
<property name="locations">
<list>
<value>classpath:conf/test.properties</value>
</list>
</property>
</bean>
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="ignoreUnresolvablePlaceholders" value="false"/>
<property name="properties" ref="propertyFactory"/>
</bean>
Now how can I inject properties directly from spring configuration?
Thanks!