the code snippet is as follows:
if (this.context instanceof ConfigurableWebApplicationContext) {
ConfigurableWebApplicationContext cwac = (ConfigurableWebApplicationContext)this.context;
if (!cwac.isActive()) {
if (cwac.getParent() == null) {
**ApplicationContext parent = this.loadParentContext(servletContext);
cwac.setParent(parent);**
}
this.configureAndRefreshWebApplicationContext(cwac, servletContext);
}
}
is mainly what the this.loadParentContext (servletContext) method actually gets, and then sets it as the parent context of the spring context. In my understanding, the container of the spring context is already a top-level container, how can there be a father?