Class AbstractAnnotationConfigMessageDispatcherServletInitializer
- All Implemented Interfaces:
org.springframework.web.WebApplicationInitializer
WebApplicationInitializer
implementations that register a MessageDispatcherServlet
configured with annotated classes, e.g. Spring's @Configuration
classes.
Concrete implementations are required to implement getRootConfigClasses()
and
getServletConfigClasses()
as well as AbstractMessageDispatcherServletInitializer.getServletMappings()
. Further template and customization
methods are provided by AbstractDispatcherServletInitializer
.
- Since:
- 2.2
- Author:
- Arjen Poutsma
-
Field Summary
Fields inherited from class org.springframework.ws.transport.http.support.AbstractMessageDispatcherServletInitializer
DEFAULT_SERVLET_MAPPINGS, DEFAULT_SERVLET_NAME
Fields inherited from class org.springframework.web.context.AbstractContextLoaderInitializer
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.web.context.WebApplicationContext
protected org.springframework.web.context.WebApplicationContext
Create a servlet application context to be provided to theMessageDispatcherServlet
.protected abstract Class<?>[]
protected abstract Class<?>[]
Specify@Configuration
and/or@Component
classes to be provided to the dispatcher servlet application context.Methods inherited from class org.springframework.ws.transport.http.support.AbstractMessageDispatcherServletInitializer
customizeRegistration, getServletMappings, getServletName, isTransformSchemaLocations, isTransformWsdlLocations, onStartup, registerMessageDispatcherServlet
Methods inherited from class org.springframework.web.context.AbstractContextLoaderInitializer
getRootApplicationContextInitializers, registerContextLoaderListener
-
Constructor Details
-
AbstractAnnotationConfigMessageDispatcherServletInitializer
public AbstractAnnotationConfigMessageDispatcherServletInitializer()
-
-
Method Details
-
createRootApplicationContext
protected org.springframework.web.context.WebApplicationContext createRootApplicationContext()This implementation creates an
AnnotationConfigWebApplicationContext
, providing it the annotated classes returned bygetRootConfigClasses()
. Returnsnull
ifgetRootConfigClasses()
returnsnull
.- Specified by:
createRootApplicationContext
in classorg.springframework.web.context.AbstractContextLoaderInitializer
-
createServletApplicationContext
protected org.springframework.web.context.WebApplicationContext createServletApplicationContext()Create a servlet application context to be provided to theMessageDispatcherServlet
.The returned context is delegated to Spring's
MessageDispatcherServlet(WebApplicationContext)
. As such, it typically contains endpoints, interceptors and other web service-related beans.This implementation creates an
AnnotationConfigWebApplicationContext
, providing it the annotated classes returned bygetServletConfigClasses()
. -
getRootConfigClasses
- Returns:
- the configuration classes for the root application context, or
null
if creation and registration of a root context is not desired
-
getServletConfigClasses
Specify@Configuration
and/or@Component
classes to be provided to the dispatcher servlet application context.- Returns:
- the configuration classes for the dispatcher servlet application context (may not be empty or
null
)
-