org.springframework.web.WebApplicationInitializer
implementations that register a DispatcherServlet in the servlet context.
Most applications should consider extending the Spring Java config subclass
AbstractAnnotationConfigDispatcherServletInitializer.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | DEFAULT_SERVLET_NAME
The default servlet name. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected FrameworkServlet | createDispatcherServlet(WebApplicationContext servletAppContext)
Create a |
| protected abstract WebApplicationContext | createServletApplicationContext()
Create a servlet application context to be provided to the |
| protected void | customizeRegistration(ServletRegistration.
the registrationDispatcherServlet registration to be customizedOptionally perform further registration customization once
|
| private EnumSet | |
| protected ApplicationContextInitializer | getServletApplicationContextInitializers()
Specify application context initializers to be applied to the servlet-specific
application context that the |
| protected Filter[] | Returns: an array of filters ornullSpecify filters to add and map to the |
| protected abstract String[] | getServletMappings()
Specify the servlet mapping(s) for the |
| protected String | |
| protected boolean | isAsyncSupported()
A single place to control the |
| public void | onStartup(ServletContext
the servletContext)ServletContext to initializeOverrides org. Implements org. Configure the given |
| protected void | registerDispatcherServlet(ServletContext
the context to register the servlet against servletContext)Register a |
| protected FilterRegistration. | Returns: the filter registrationthe servlet context to register filters with servletContext, Filter the filter to be registered filter)Add the given filter to the ServletContext and map it to the
|
| DEFAULT_SERVLET_NAME | back to summary |
|---|---|
| public static final String DEFAULT_SERVLET_NAME The default servlet name. Can be customized by overriding | |
| AbstractDispatcherServletInitializer | back to summary |
|---|---|
| public AbstractDispatcherServletInitializer() | |
| createDispatcherServlet | back to summary |
|---|---|
| protected FrameworkServlet createDispatcherServlet(WebApplicationContext servletAppContext) Create a Note This allows for any | |
| createServletApplicationContext | back to summary |
|---|---|
| protected abstract WebApplicationContext createServletApplicationContext() Create a servlet application context to be provided to the The returned context is delegated to Spring's
| |
| customizeRegistration | back to summary |
|---|---|
| protected void customizeRegistration(ServletRegistration. Optionally perform further registration customization once
| |
| getDispatcherTypes | back to summary |
|---|---|
| private EnumSet | |
| getServletApplicationContextInitializers | back to summary |
|---|---|
| protected ApplicationContextInitializer Specify application context initializers to be applied to the servlet-specific
application context that the
| |
| getServletFilters | back to summary |
|---|---|
| protected Filter[] getServletFilters() Specify filters to add and map to the
| |
| getServletMappings | back to summary |
|---|---|
| protected abstract String[] getServletMappings() Specify the servlet mapping(s) for the | |
| getServletName | back to summary |
|---|---|
| protected String getServletName() Return the name under which the | |
| isAsyncSupported | back to summary |
|---|---|
| protected boolean isAsyncSupported() A single place to control the The default value is "true". | |
| onStartup | back to summary |
|---|---|
| public void onStartup(ServletContext servletContext) throws ServletException Overrides org. Implements org. Doc from org. Configure the given
| |
| registerDispatcherServlet | back to summary |
|---|---|
| protected void registerDispatcherServlet(ServletContext servletContext) Register a This method will create a Further customization can be achieved by overriding
| |
| registerServletFilter | back to summary |
|---|---|
| protected FilterRegistration. Add the given filter to the ServletContext and map it to the
If the above defaults are not suitable or insufficient, override this
method and register filters directly with the
| |