@Autowired是单例模式,因为它在注入之前,对象已经实例化

通过@Scope(“prototype”),@Autowired注入的也是单例模式

此外,@Autowired+@Qualifier(“student”) 与@Resource作用一致,当获取对象时,并不能稳定获取到多例,在使用时需要注意