上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 24 下一页
摘要: Spring IOC 的核心是 AbstractApplicationContext 的 refresh 方法。 其中一共有 13 个主要方法,这里分析第 6 个:registerBeanPostProcessors。 1 AbstractApplicationContext 1-1 注册 Bean 阅读全文
posted @ 2022-03-14 13:58 天航星 阅读(49) 评论(0) 推荐(0)
摘要: Spring IOC 的核心是 AbstractApplicationContext 的 refresh 方法。 其中一共有 13 个主要方法,这里分析第 7 个:initMessageSource。 1 AbstractApplicationContext 1-1 初始化 message 源 in 阅读全文
posted @ 2022-03-14 13:58 天航星 阅读(59) 评论(0) 推荐(0)
摘要: Spring IOC 的核心是 AbstractApplicationContext 的 refresh 方法。 其中一共有 13 个主要方法,这里分析第 8 个:initApplicationEventMulticaster。 1 AbstractApplicationContext 1-1 初始 阅读全文
posted @ 2022-03-14 13:58 天航星 阅读(59) 评论(0) 推荐(0)
摘要: Spring IOC 的核心是 AbstractApplicationContext 的 refresh 方法。 其中一共有 13 个主要方法,这里分析第 4 个:postProcessBeanFactory。 1 AbstractApplicationContext 1-1 定义 Bean 工厂的 阅读全文
posted @ 2022-03-14 13:57 天航星 阅读(45) 评论(0) 推荐(0)
摘要: Spring IOC 的核心是 AbstractApplicationContext 的 refresh 方法。 其中一共有 13 个主要方法,这里分析第 5 个:invokeBeanFactoryPostProcessors。 1 AbstractApplicationContext 1-1 执行 阅读全文
posted @ 2022-03-14 13:57 天航星 阅读(48) 评论(0) 推荐(0)
摘要: Spring IOC 的核心是 AbstractApplicationContext 的 refresh 方法。 其中一共有 13 个主要方法,这里分析第 3 个:prepareBeanFactory。 1 AbstractApplicationContext 1-1 对 BeanFactory 进 阅读全文
posted @ 2022-03-14 13:56 天航星 阅读(41) 评论(0) 推荐(0)
摘要: Spring IOC 的核心是 AbstractApplicationContext 的 refresh 方法。 其中一共有 13 个主要方法,这里分析第 2 个:obtainFreshBeanFactory。 1 AbstractApplicationContext 1-1 创建容器对象 obta 阅读全文
posted @ 2022-03-14 13:56 天航星 阅读(74) 评论(0) 推荐(0)
摘要: Spring IOC 的核心是 AbstractApplicationContext 的 refresh 方法。 其中一共有 13 个主要方法,这里分析第 1 个:prepareRefresh。 1 AbstractApplicationContext 1-1 刷新前的准备工作 prepareRef 阅读全文
posted @ 2022-03-01 16:39 天航星 阅读(59) 评论(0) 推荐(0)
摘要: Spring IOC 主要有两种实现方式:XML 和注解。 这里分析 XML 方式。 ClassPathXmlApplicationContext("applicationContext.xml") 配置文件 首先看解析的对象:配置文件。 <?xml version="1.0" encoding=" 阅读全文
posted @ 2022-02-26 18:01 天航星 阅读(61) 评论(0) 推荐(0)
摘要: 总流程 基本接口 IOC 容器两种实现方式:BeanFactory 和 ApplicationContext。 BeanFactory 容器的根接口,也是容器的入口。 Spring 内部使用的接口,不推荐开发人员使用。 加载配置文件的时候不会创建对象,在获取对象(使用)才去创建对象。 必须遵循完成的 阅读全文
posted @ 2022-02-26 18:00 天航星 阅读(49) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 24 下一页