构造器注入
@Autowired
public AService(BService bService) {
this.bService = bService;
}
set注入 (重点)
AService aService;
@Autowired
public void setaService(AService aService) {
this.aService = aService;
}
属性注入
@Autowired
AService aService;
标签:bService,spring,aService,Autowired,三种,AService,注入
From: https://www.cnblogs.com/huiwuyan20/p/16644595.html