视频地址:https://www.youtube.com/watch?v=Umvv5GXLFu4

讲解

https://cdn.nlark.com/yuque/0/2021/png/576791/1617290567972-9d8a5de1-ba47-4eab-87d7-9a77c370465e.png#align=left&display=inline&height=839&originHeight=1678&originWidth=3500&size=1764338&status=done&style=none&width=1750

Two Types of IOC Container:

  1. BeanFactory
  2. ApplicationContext

Difference Between BeanFactory & ApplicationContext

  1. org.springframework.beans.factory.BeanFactory
  2. org.springframework.context.ApplicationContext

These two interfaces acts as IOC container.

这两个接口充当IOC容器。

ApplicationContext have extra functionlity than BeanFactiry interface such as simple integration with Spring AOP,I18N-message resource handling, event propagation, application layer specific context like webApplicontext for web Application.

与BeanFactiry接口相比,ApplicationContext具有更多功能,例如与Spring AOP的简单集成,I18N消息资源处理,事件传播,特定于应用程序层的上下文,例如用于Web应用程序的webApplicontext。

代码