Created
January 3, 2013 15:18
-
-
Save madan712/4444228 to your computer and use it in GitHub Desktop.
Spring - How to inject List/ Map using bean? We have a class Country.java with two instance variables city and president. We will set those values using applicationContext.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javaxp; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
public class Country { | |
private HashMap city; | |
private ArrayList president; | |
public HashMap getCity() { | |
return city; | |
} | |
public void setCity(HashMap city) { | |
this.city = city; | |
} | |
public ArrayList getPresident() { | |
return president; | |
} | |
public void setPresident(ArrayList president) { | |
this.president = president; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment