spring是一个重要的j2ee轻量级框架,其中最重要的两个概念为aoc(inversion of control)-控制反转,即依赖注入dependence injection。
三种依赖注入的方式,构造方法注入(constructor injection)、setter方法注入(setter injection)以及接口注入(interface injection)。可以参考matin flower写的文章“inversion of control containers and the dependency injection pattern”,描述得十分详细。
Spring提供了两种容器类型:Beanfactory和ApplicationContext。