ApplicationContext与BeanFactory的联系和区别

ClassPathXmlApplicationContext
ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring.xml");

ApplicationContext与BeanFactory的联系和区别

追溯发现其实继承了ApplicationContext

ApplicationContext与BeanFactory的联系和区别

 继承关系

public interface ApplicationContext extends EnvironmentCapable, ListableBeanFactory, HierarchicalBeanFactory, MessageSource, ApplicationEventPublisher, ResourcePatternResolver {

发现继承了很多beanfactory,而这些beanfactory都继承于beanfactory

ApplicationContext是一个集大成者

上一篇:Error starting ApplicationContext. To display the conditions report re-run your application with ‘de


下一篇:敬业签苹果ios手机便签APP怎么上传文件附件?