Spring 3.2 的默认自动装配方法是什么?所以假设我有这门课
public class Saxophonist implements IPerform{
@Override
public String perform() {
return "I am A Saxophonist and I am Playing The : "+ saxophone;
}
private Instrument saxophone;
public Instrument getSaxophone() {
return saxophone;
}
@Autowired
public void setSaxophone(Instrument saxophone) {
this.saxophone = saxophone;
}
}
它会按名称执行还是按类型执行?