To create a bean of type java.util.properties in Java xml use the following code.
<bean id="attendkey" class="java.util.Properties" name="attendenceKeys"/>
<bean id="attendkey.load" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject"><ref bean="attendkey"/></property>
<property name="targetMethod"><value>putAll</value></property>
<property name="arguments">
<props>
<prop key="Present">1</prop>
<prop key="Absent" >-1</prop>
</props>
</property>
</bean>
Example :
No comments:
Post a Comment