Header Ads

ad
Suppose the property ‘books’ is declared like:
1
2
3
4
5
6
7
8
public class Library {
 
    //A Properties having 'isbnNumber' (String) as key and Book Name (String) as value
    private Properties<isbnNumber,bookName> books;
 
    //Getter/Setter methods here
 
}
Lets see how to configure a bean property ‘books’ of type ‘java.util.Properties’.
1
2
3
4
5
6
7
8
9
<bean id="library" class="com.mindfire.bean.Library">
    <property name="books">
        <props>
            <prop key = "11111" > Spring </prop>
            <prop key = "2222" > Java </prop>
            <prop key = "3333" > MySql </prop>
        </props>
    </property>
</bean>
The <props> ele 

No comments