SpringApplication.run(DemoApplication.class, args); -> [ConfigurableApplicationContext] ConfigurableApplicationContext.run(new Class[]{primarySource}, args) -> new SpringApplication(primarySources)).run(args) -> 打开stopWatch 配置上下文 配置文件 类监听器 新建类 类工厂新建类实例 prepareContext refreshContext afterRefresh 关闭stopWatch
创建bean + 解决循环依赖问题:
AbstractBeanFactory getBean(name) -> doGetBean(name, (Class)null, (Object[])null, false) -> createBean ->doCreateBean ->createBeanInstance ->populateBean