• inversion of control
  • 容器用工厂装配对象并管理, 面向接口编程
  • 优点
    • 降低代码量
    • 容易测试
    • 最小侵入性松耦合
  • 方式
    • Setter
    • 构造器
    • 静态工厂、实例工厂