![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring
文章平均质量分 68
扬帆舟
生活就是工作,工作就是生活
展开
-
关于@Autowired的那些事
先抛个问题: 接口package com.che.api.test;/** * @author zhoufy * @date 2017年9月8日 下午2:25:12 */public interface OrderService { /** * 下单处理 */ public void createOrder(); }实现类:package com.che.a原创 2017-09-08 14:52:39 · 697 阅读 · 0 评论 -
Spring源码(3)Context篇之ConfigurableWebApplicationContext
上一篇讲解了Spring通过ContextLoader类的initWebApplicationContext方法创建的WebApplicationContext实为XmlWebApplicationContext实例再看initWebApplicationContext方法的源码:/** * 为了讲重点,省略了部分源码 */public WebApplicationContext in...原创 2018-12-27 18:55:45 · 3821 阅读 · 0 评论 -
Spring源码(4)Context篇之AbstractApplicationContext(上)
上一篇讲解了Spring的ContextLoader类在初始化Spring应用上下文时,调用了refresh()方法,该方法的具体实现就在AbstractApplicationContext类里下面就来看一下refresh方法都做了哪些事:@Overridepublic void refresh() throws BeansException, IllegalStateException {...原创 2019-01-03 17:49:27 · 1092 阅读 · 2 评论 -
Spring源码(1)Context篇之ContextLoader
spring源码之Context篇Spring项目如此强大 , 以至于现在的项目都是依赖Spring搭建,天天与spring打交道,自问一下,你是否真的了解它?Servlet与Spring的关系J2EE标准ServletSpring我们经常在web.xml里配置如下代码:<listener> &原创 2018-12-25 14:56:02 · 1774 阅读 · 0 评论 -
Spring源码(4)Context篇之AbstractApplicationContext(下)
上一篇讲解了Spring的AbstractApplicationContext类refresh()方法, 前六步(其中五步)都是针对BeanFactory的处理…下面接着讲其七:initMessageSource();/*** Initialize the MessageSource. * Use parent's if none defined in this context. */...原创 2019-01-10 16:58:58 · 738 阅读 · 1 评论 -
Spring源码(2)Context篇之WebApplicationContext
上一篇讲解了Spring加载Context的起源来自工程下web.xml配置的Listener<listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class&amp原创 2018-12-26 11:03:41 · 654 阅读 · 0 评论