@Autowired 注释 vs xml中的自动装配(按照class类型对倚赖关系进行注入)如:
public class Boss {
private Office office;
@Autowired
public void setOffice(Office office) {
this.office = office;
}
}
public class Boss {
private Office office;
@Autowired
public void setOffice(Office office) {
this.office = office;
}
}