摘要: 首先来看一段代码,看过上一节的朋友肯定对这段代码并不陌生。这一段代码诠释了Spring加载bean的完整过程,包括读取配置文件,扫描包,加载类,实例化bean,注入bean属性依赖。 public void refresh() throws BeansException, IllegalStateE 阅读全文
posted @ 2017-09-10 15:43 码农阿当lodor 阅读(231) 评论(0) 推荐(0) 编辑
摘要: web.xml中有这么一段声明 利用ServletContextListener接口监听到启动事件,调用 ContextLoader.initWebApplicationContext方法完成启动 过程在 ContextLoader.initWebApplicationContext事件中,如下: 阅读全文
posted @ 2017-09-10 12:05 码农阿当lodor 阅读(454) 评论(0) 推荐(0) 编辑