WebApplicationInitializer
to register a DispatcherServlet and use Java-based Spring configuration.
Implementations are required to implement:
getRootConfigClasses() -- for "root" application context (non-web
infrastructure) configuration.
getServletConfigClasses() -- for DispatcherServlet
application context (Spring MVC infrastructure) configuration.
If an application context hierarchy is not required, applications may
return all configuration via getRootConfigClasses() and return
null from getServletConfigClasses().
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected WebApplicationContext | createRootApplicationContext()
Implements abstract org. Create the "root" application context to be provided to the
|
| protected WebApplicationContext | createServletApplicationContext()
Implements abstract org. Create a servlet application context to be provided to the |
| protected abstract Class | Returns: the configuration for the root application context, ornull
if creation and registration of a root context is not desiredSpecify |
| protected abstract Class | Returns: the configuration for the Servlet application context, ornull if all configuration is specified through root config classes.Specify |
| AbstractAnnotationConfigDispatcherServletInitializer | back to summary |
|---|---|
| public AbstractAnnotationConfigDispatcherServletInitializer() | |
| createRootApplicationContext | back to summary |
|---|---|
| protected WebApplicationContext createRootApplicationContext() Implements abstract org. Doc from org. Create the "root" application context to be provided to the
The returned context is delegated to
This implementation creates an
| |
| createServletApplicationContext | back to summary |
|---|---|
| protected WebApplicationContext createServletApplicationContext() Implements abstract org. Create a servlet application context to be provided to the The returned context is delegated to Spring's
This implementation creates an
| |
| getRootConfigClasses | back to summary |
|---|---|
| protected abstract Class Specify | |
| getServletConfigClasses | back to summary |
|---|---|
| protected abstract Class Specify | |