The org.springframework.beans and org.springframework.context packages are the basis for Spring Framework’s IoC container. The BeanFactory interface provides an advanced configuration mechanism capable of managing any type of object. ApplicationContext is a sub-interface of BeanFactory. It adds:
Easier integration with Spring’s AOP featuresMessage resource handling (for use in internationalization)Event publicationApplication-layer specific contexts such as the WebApplicationContext for use in web applications.In short, the BeanFactory provides the configuration framework and basic functionality, and the ApplicationContext adds more enterprise-specific functionality. The ApplicationContext is a complete superset of the BeanFactory and is used exclusively in this chapter in descriptions of Spring’s IoC container. For more information on using the BeanFactory instead of the ApplicationContext, see The BeanFactory.
ClassPathXmlApplicationContext <- AbstractRefreshableApplicationContext <- ApplicactionContext <- BeanFactory
ClassPathXmlApplicationContext#getBean() = AbstractRefreshableApplicationContext#getBeanFactory()#getBean()
AbstractRefreshableApplicationContext#getBeanFactory() = DefaultListableBeanFactory <- BeanFactory
