图解 Spring 核心数据结构:BeanDefinition 其二 概述 前面写过一篇相关文章作为开篇介绍了一下BeanDefinition,本篇将深入细节来向读者展示BeanDefinition的设计,让我们一起来揭开日常开发中使用的bean的神秘面纱,深入细节透彻理解spring bean的概念。 一、BeanDefinition的加载过程 首先我们来复习一下spring 容器的类的继承体系: 可以看到这是一个庞大的类继承体系,上面都是实现的接口,第一个实现类是AbstractApplicationContext,这里面有一个关键的方法fefresh(),该方法为 spring 启动入口,本文重点不是梳理这个方法,如果有需要可以留言后续出文章进行详细分析。 @Override public void refresh() throws BeansException, IllegalStateException { synchronized (this.startupShutdownMonitor) { // Prepare this context for refreshing.
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with postProcess
Contact postProcess, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack