摘要: 1、设置容器的启动时间: this.startupDate = System.currentTimeMillis();2、设置活跃状态为true: this.closed.set(false);3、设置关闭状态为false: this.active.set(true);4、获取Environment 阅读全文
posted @ 2024-02-24 19:50 小黑与小白 阅读(54) 评论(0) 推荐(0)
摘要: 1.XML方式配置bean启动Spring的核心类: ClassPathXmlApplicationContext -> AbstractXmlApplicationContext 类结构如下: 核心方法: refresh()方法, 刷新容器, 包含12个核心子方法, 如下: 方法1: prepar 阅读全文
posted @ 2024-02-24 19:34 小黑与小白 阅读(61) 评论(0) 推荐(0)