var ioc = {
xiaohei:{
type:'bean.Person',
args:[],
fields:{
id:1,
name:'小黑'
}
},
xiaobai:{
type:'bean.Person',
args:[1,'小白',{refer:'xiaohei'}]
}
};
public class Person {
private int id;
private String name;
private Person friend;
public Person() {
}
public Person(int id, String name, Person friend) {
this.id = id;
this.name = name;
this.friend = friend;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Person getFriend() {
return friend;
}
public void setFriend(Person friend) {
this.friend = friend;
}
}
如果friend是一个list或者数组该怎么注入?