依赖注入的三种方式

进行依赖注入有三种方式: 1、构造方法依赖注入 public class StupidStudent { private SmartStudent smartStudent; public StupidStudent(SmartStudent smartStudent) { this.smartSt
posted @ 2020-09-29 21:25  Best丶zhaotf  阅读(7202)  评论(0编辑  收藏  举报