该例中构造器方式注释掉@Autowired也可正常使用?
构造器方式,把 @Autowired注释掉也可正常使用,这是为什么呢?
private InjectionDAO injectionDAO;
// @Autowired
public InjectionServiceImpl(InjectionDAO injectionDAO) {
this.injectionDAO = injectionDAO;
}
构造器方式,把 @Autowired注释掉也可正常使用,这是为什么呢?
private InjectionDAO injectionDAO;
// @Autowired
public InjectionServiceImpl(InjectionDAO injectionDAO) {
this.injectionDAO = injectionDAO;
}
2019-07-18
举报