Spring源码情操陶冶-AbstractApplicationContext#onRefresh

承接前文Spring源码情操陶冶-AbstractApplicationContext#initApplicationEventMulticaster
约定web.xml配置的contextClass为默认值XmlWebApplicationContext

直接源码AbstractRefreshableWebApplicationContext#onRefresh

	/**
	 * Initialize the theme capability.
	 */
	 protected void onRefresh() {
		 //设置themeSource,设置情况与前文一致,查找的bean为themeSource
		this.themeSource = UiApplicationContextUtils.initThemeSource(this);
	}

初始化themeSource主题源,默认使用ResourceBundleThemeSource

下节预告

Spring源码情操陶冶-AbstractApplicationContext#registerListeners

posted @ 2017-05-11 20:53  南柯问天  阅读(563)  评论(0编辑  收藏  举报