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。