Class AbstractAnnotationConfigMessageDispatcherServletInitializer

java.lang.Object
org.springframework.web.context.AbstractContextLoaderInitializer
org.springframework.ws.transport.http.support.AbstractMessageDispatcherServletInitializer
org.springframework.ws.transport.http.support.AbstractAnnotationConfigMessageDispatcherServletInitializer
All Implemented Interfaces:
org.springframework.web.WebApplicationInitializer

public abstract class AbstractAnnotationConfigMessageDispatcherServletInitializer extends AbstractMessageDispatcherServletInitializer
Base class for 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
  • 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 by getRootConfigClasses(). Returns null if getRootConfigClasses() returns null.

      Specified by:
      createRootApplicationContext in class org.springframework.web.context.AbstractContextLoaderInitializer
    • createServletApplicationContext

      protected org.springframework.web.context.WebApplicationContext createServletApplicationContext()
      Create a servlet application context to be provided to the MessageDispatcherServlet.

      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 by getServletConfigClasses().

      Specified by:
      createServletApplicationContext in class AbstractMessageDispatcherServletInitializer
      See Also:
    • getRootConfigClasses

      protected abstract Class<?>[] getRootConfigClasses()
      Specify @Configuration and/or @Component classes to be provided to the root application context.
      Returns:
      the configuration classes for the root application context, or null if creation and registration of a root context is not desired
    • getServletConfigClasses

      protected abstract Class<?>[] 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)