spring流程
2022-01-16 22:44:57 0 举报
a
作者其他创作
大纲/内容
createBeanInstance()实例化
this.invokeBeanFactoryPostProcessors(beanFactory);加载配置类包装成BeanDefinition
beanWrapper
refresh()
new ClassPathXmlApplicationContext(\"xx.xml\")
ApplicationContext
new AnnotationConfigApplicationContext(xx.class);
拿到@ComponentScan注解,默认为当前类所在的包及子包
找到需要注入的bean DI
获取匹配的所有calss文件,判断是否带有@Component注解,如果有装载到容器中,此时并不进行初始化操作
0 条评论
下一页