![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Pattern
flyforlove
这个作者很懒,什么都没留下…
展开
-
IOC模式 Type3(构造子注入)
使用轻量级容器PicoContainer来实现IOC(Inversion of Control也叫Dependency Injection)模式的Type3简单应用实例public interface Fruit { void eat(Object eater);}public class Apple implements Fruit { public void eat(Object e原创 2006-06-09 15:27:00 · 1078 阅读 · 0 评论 -
IOC模式Typy2(设值方法注入)
利用Spring框架来实现IOC模式的Type2,基本思想是通过Bean的Setter来注入。class MovieLister... private MovieFinder finder; public void setFinder(MovieFinder finder) { this.finder = finder; }Similarly I def原创 2006-06-09 15:38:00 · 1072 阅读 · 0 评论