前言-阅读源码有利于陶冶情操,本文承接前文Spring源码情操陶冶-AbstractApplicationContext 约束: 本文指定contextClass为默认的XmlWebApplicationContext 从属AbstractApplicationContext#refresh方法 AbstractApplicationContext#obtainFreshBeanFactory 该方法主要完成创建Bean工厂,涉及到解析spring文件,代码清单如下 protected Conf…
阅读源码有助于陶冶情操,本文承接Spring源码情操陶冶-AbstractApplicationContext#obtainFreshBeanFactory 瞧瞧官方注释 /** * Configure the factory's standard context characteristics, * such as the context's ClassLoader and post-processors. * @param beanFactory the BeanFactory to con…
前言-阅读源码有利于陶冶情操,本文承接前文Spring源码情操陶冶-AbstractApplicationContext 约束: 本文指定contextClass为默认的XmlWebApplicationContext 从属AbstractApplicationContext#refresh方法 AbstractApplicationContext#prepareRefresh 代码清单如下 protected void prepareRefresh() { //设置刷新开始时间 this.st…
承接前文Spring源码情操陶冶-AbstractApplicationContext#registerListeners 约定web.xml配置的contextClass为默认值XmlWebApplicationContext 直接源码AbstractRefreshableWebApplicationContext#finishBeanFactoryInitialization /** * Finish the initialization of this context's bean fac…
承接前文Spring源码情操陶冶-AbstractApplicationContext#onRefresh 约定web.xml配置的contextClass为默认值XmlWebApplicationContext 直接源码AbstractRefreshableWebApplicationContext#registerListeners /** * Add beans that implement ApplicationListener as listeners. * Doesn't affec…
承接前文Spring源码情操陶冶-AbstractApplicationContext#initApplicationEventMulticaster 约定web.xml配置的contextClass为默认值XmlWebApplicationContext 直接源码AbstractRefreshableWebApplicationContext#onRefresh /** * Initialize the theme capability. */ protected void onRefresh…
承接前文Spring源码情操陶冶-AbstractApplicationContext#initMessageSource 约定web.xml配置的contextClass为默认值XmlWebApplicationContext 瞧瞧官方注释 /** * Initialize the ApplicationEventMulticaster. * Uses SimpleApplicationEventMulticaster if none defined in the context. * @se…
承接前文Spring源码情操陶冶-AbstractApplicationContext#registerBeanPostProcessors 约定web.xml配置的contextClass为默认值XmlWebApplicationContext 瞧瞧官方注释 /** * Initialize the MessageSource. * Use parent's if none defined in this context. */ 初始化MessageSource消息源,如果beanFactor…
承接前文Spring源码情操陶冶-AbstractApplicationContext#invokeBeanFactoryPostProcessors 瞧瞧官方注释 /** * Instantiate and invoke all registered BeanPostProcessor beans, * respecting explicit order if given. * <p>Must be called before any instantiation of application…
阅读源码有利于陶冶情操,承接前文Spring源码情操陶冶-AbstractApplicationContext#postProcessBeanFactory 约定:web.xml中配置的contextClass为XmlWebApplicationContext 瞧瞧官方注释 /** * Instantiate and invoke all registered BeanFactoryPostProcessor beans, * respecting explicit order if given…