@ -32,6 +32,7 @@ import org.springframework.util.ObjectUtils;
@@ -32,6 +32,7 @@ import org.springframework.util.ObjectUtils;
import org.springframework.web.context.AbstractContextLoaderInitializer ;
import org.springframework.web.context.WebApplicationContext ;
import org.springframework.web.servlet.DispatcherServlet ;
import org.springframework.web.servlet.FrameworkServlet ;
/ * *
* Base class for { @link org . springframework . web . WebApplicationInitializer }
@ -90,7 +91,7 @@ public abstract class AbstractDispatcherServletInitializer extends AbstractConte
@@ -90,7 +91,7 @@ public abstract class AbstractDispatcherServletInitializer extends AbstractConte
"createServletApplicationContext() did not return an application " +
"context for servlet [" + servletName + "]" ) ;
Dispatcher Servlet dispatcherServlet = createDispatcherServlet ( servletAppContext ) ;
Framework Servlet dispatcherServlet = createDispatcherServlet ( servletAppContext ) ;
dispatcherServlet . setContextInitializers ( getServletApplicationContextInitializers ( ) ) ;
ServletRegistration . Dynamic registration = servletContext . addServlet ( servletName , dispatcherServlet ) ;
@ -132,9 +133,12 @@ public abstract class AbstractDispatcherServletInitializer extends AbstractConte
@@ -132,9 +133,12 @@ public abstract class AbstractDispatcherServletInitializer extends AbstractConte
protected abstract WebApplicationContext createServletApplicationContext ( ) ;
/ * *
* Create a { @link DispatcherServlet } with the specified { @link WebApplicationContext } .
* Create a { @link DispatcherServlet } ( or other kind of { @link FrameworkServlet } - derived
* dispatcher ) with the specified { @link WebApplicationContext } .
* < p > Note : This allows for any { @link FrameworkServlet } subclass as of 4 . 2 . 3 .
* Previously , it insisted on returning a { @link DispatcherServlet } or subclass thereof .
* /
protected DispatcherServlet createDispatcherServlet ( WebApplicationContext servletAppContext ) {
protected Framework Servlet createDispatcherServlet ( WebApplicationContext servletAppContext ) {
return new DispatcherServlet ( servletAppContext ) ;
}