摘要: spring组件的构造器参好神奇 这里有一个接口:FruitService和两个实现类:AppleService、BananaService,假设我想在其中一个实现类实例化中获取当前Spring容器的Bean怎么办? 只需要重写该实现类的构造方法: @Component public class A 阅读全文
posted @ 2020-07-04 18:23 Kobelieve 阅读(2636) 评论(0) 推荐(0) 编辑