ApplicationContext接口继承BeanFactory接口,可以进行Bean的自动装配。 BeanFactory在第一次getBean时初始化Bean, ApplicationContext在加载配置文件时初始化Bean