This commit is contained in:
Phillip Webb 2019-12-13 11:31:06 -08:00
parent be3b11db48
commit 830c2ef7f1
1 changed files with 2 additions and 0 deletions

View File

@ -92,10 +92,12 @@ public abstract class SpringBootServletInitializer implements WebApplicationInit
WebApplicationContext rootAppContext = createRootApplicationContext(servletContext); WebApplicationContext rootAppContext = createRootApplicationContext(servletContext);
if (rootAppContext != null) { if (rootAppContext != null) {
servletContext.addListener(new ContextLoaderListener(rootAppContext) { servletContext.addListener(new ContextLoaderListener(rootAppContext) {
@Override @Override
public void contextInitialized(ServletContextEvent event) { public void contextInitialized(ServletContextEvent event) {
// no-op because the application context is already initialized // no-op because the application context is already initialized
} }
}); });
} }
else { else {