承接前文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