##Bean的建立流程spring
st=>start: springBoot main方法run e=>end: Bean建立完成 op1=>operation: SpringApplication.refreshContext(context) op2=>operation: SpringApplication.refresh(context) op3=>operation: EmbeddedWebApplicationContext.refresh()(super.refesh()) op4=>operation: AbstractApplicationContext.refresh() // Instantiate all remaining (non-lazy-init) singletons. //finishBeanFactoryInitialization(beanFactory); op5=>operation: AbstractApplicationContext.finishBeanFactoryInitialization() // Instantiate all remaining (non-lazy-init) singletons. //beanFactory.preInstantiateSingletons(); op6=>operation: DefaultListableBeanFactory.preInstantiateSingletons() //getBean(beanName); op7=>operation: AbstractBeanFactory.getBean(String name) //return doGetBean(name, null, null, false); op8=>operation: AbstractBeanFactory.doGetBean() //sharedInstance = getSingleton(beanName, new ObjectFactory<Object>() op9=>operation: DefaultSingletonBeanRegistry.getSingleton(String beanName, ObjectFactory<?> singletonFactory) //singletonObject = singletonFactory.getObject(); op10=>operation: AbstractBeanFactory.return createBean(beanName, mbd, args); op11=>operation: AbstractAutowireCapableBeanFactory.doCreateBean(beanName, mbdToUse, args); op12=>operation: AbstractAutowireCapableBeanFactory.createBeanInstance(beanName, mbd, args); op13=>operation: AbstractAutowireCapableBeanFactory. instantiateUsingFactoryMethod(beanName, mbd, args) op14=>operation: ConstructorResolver.this.beanFactory.getInstantiationStrategy().instantiate( mbd, beanName, this.beanFactory, factoryBean, factoryMethodToUse, argsToUse); op15=>operation: SimpleInstantiationStrategy.factoryMethod.invoke(factoryBean, args); cond=>condition: 是否已經購買並登陸了馬克飛象? st->op1->op2->op3->op4->op5->op6->op7->op8->op9->op10->op11->op12->op13->op14->op15->e