第一章 SpringIOC底层实现

1.1 BeanFactory与ApplicationContexet
  • BeanFactory:IOC容器的基本实现,是Spring内部的使用接口,是面向Spring本身的,不是提供给开发人员使用的。****
  • ApplicationContext:BeanFactory的子接口,提供了更多高级特性。面向Spring的使用者,几乎所有场合都使用ApplicationContext而不是底层的BeanFactory。
1.2 图解IOC类的结构

IDEA版SSM入门到实战(Maven+MyBatis+Spring+SpringMVC) -Spring IOC底层实现-LMLPHP

  • BeanFactory:Spring底层IOC实现【面向Spring框架】
      • ApplicationContext:面向程序员
        • ConfigurableApplicationContext:提供关闭或刷新容器对象方法
            • ClassPathXmlApplicationContext:基于类路径检索xml文件
            • AnnotationConfigApplicationContext:基于注解创建容器对象
            • FileSystemXmlApplicationContext:基于文件系统检索xml文件
12-12 06:18