logger.info("[init/rootContext] the root context exists:" + oldRootContext);
}
return (RoseWebAppContext) oldRootContext;
}
RoseWebAppContext rootContext = new RoseWebAppContext(getServletContext(), load, false);
String contextConfigLocation = this.contextConfigLocation;
// 确认所使用的applicationContext配置
if (StringUtils.isBlank(contextConfigLocation)) {
String webxmlContextConfigLocation = getServletContext().getInitParameter(
"contextConfigLocation");
if (StringUtils.isBlank(webxmlContextConfigLocation)) {
contextConfigLocation = RoseWebAppContext.DEFAULT_CONFIG_LOCATION;
} else {
contextConfigLocation = webxmlContextConfigLocation;
}
}
rootContext.setConfigLocation(contextConfigLocation);
rootContext.setId("rose.root");
rootContext.refresh();
if (logger.isInfoEnabled()) {
logger.info("[init/rootContext] exits");
}