Package com.emc.documentum.rest.context
Class WebAppInitializer
- java.lang.Object
-
- org.springframework.web.context.AbstractContextLoaderInitializer
-
- org.springframework.web.servlet.support.AbstractDispatcherServletInitializer
-
- org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer
-
- com.emc.documentum.rest.context.WebAppInitializer
-
- All Implemented Interfaces:
org.springframework.web.WebApplicationInitializer
public class WebAppInitializer extends org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer implements org.springframework.web.WebApplicationInitializerCore REST customization on Spring AbstractAnnotationConfigDispatcherServletInitializer. Register filters to the servlet
-
-
Constructor Summary
Constructors Constructor Description WebAppInitializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.web.servlet.FrameworkServletcreateDispatcherServlet(org.springframework.web.context.WebApplicationContext servletAppContext)Create aRestDispatcherServletwith the specifiedWebApplicationContextand context config location:com.emc.documentum.rest.context.jc.protected org.springframework.web.context.WebApplicationContextcreateRootApplicationContext()protected Class<?>[]getRootConfigClasses()protected Class<?>[]getServletConfigClasses()protected javax.servlet.Filter[]getServletFilters()Specify filters to add and map to theDispatcherServlet.protected String[]getServletMappings()Specify the servlet mapping(s)to be '/*' for theDispatcherServlet;protected StringgetServletName()Return the name under which theDispatcherServletwill be registered.voidonStartup(javax.servlet.ServletContext servletContext)protected javax.servlet.FilterRegistration.DynamicregisterServletFilter(javax.servlet.ServletContext servletContext, javax.servlet.Filter filter)Append this filter after other registeredFilter-
Methods inherited from class org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer
createServletApplicationContext
-
Methods inherited from class org.springframework.web.servlet.support.AbstractDispatcherServletInitializer
customizeRegistration, getServletApplicationContextInitializers, isAsyncSupported, registerDispatcherServlet
-
-
-
-
Method Detail
-
getRootConfigClasses
protected Class<?>[] getRootConfigClasses()
- Specified by:
getRootConfigClassesin classorg.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer
-
getServletConfigClasses
protected Class<?>[] getServletConfigClasses()
- Specified by:
getServletConfigClassesin classorg.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer
-
getServletMappings
protected String[] getServletMappings()
Specify the servlet mapping(s)to be '/*' for theDispatcherServlet;- Specified by:
getServletMappingsin classorg.springframework.web.servlet.support.AbstractDispatcherServletInitializer- See Also:
AbstractDispatcherServletInitializer.registerDispatcherServlet(ServletContext)
-
onStartup
public void onStartup(javax.servlet.ServletContext servletContext) throws javax.servlet.ServletException- Specified by:
onStartupin interfaceorg.springframework.web.WebApplicationInitializer- Overrides:
onStartupin classorg.springframework.web.servlet.support.AbstractDispatcherServletInitializer- Throws:
javax.servlet.ServletException
-
createRootApplicationContext
protected org.springframework.web.context.WebApplicationContext createRootApplicationContext()
- Overrides:
createRootApplicationContextin classorg.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer
-
getServletFilters
protected javax.servlet.Filter[] getServletFilters()
Specify filters to add and map to theDispatcherServlet.- Overrides:
getServletFiltersin classorg.springframework.web.servlet.support.AbstractDispatcherServletInitializer- Returns:
- an array of filters or
null - See Also:
registerServletFilter(ServletContext, Filter)
-
getServletName
protected String getServletName()
Return the name under which theDispatcherServletwill be registered. Defaults toSERVLET_NAME.- Overrides:
getServletNamein classorg.springframework.web.servlet.support.AbstractDispatcherServletInitializer- See Also:
AbstractDispatcherServletInitializer.registerDispatcherServlet(ServletContext)
-
createDispatcherServlet
protected org.springframework.web.servlet.FrameworkServlet createDispatcherServlet(org.springframework.web.context.WebApplicationContext servletAppContext)
Create aRestDispatcherServletwith the specifiedWebApplicationContextand context config location:com.emc.documentum.rest.context.jc.Note: This allows for any
FrameworkServletsubclass as of 4.2.3. Previously, it insisted on returning aDispatcherServletor subclass thereof.- Overrides:
createDispatcherServletin classorg.springframework.web.servlet.support.AbstractDispatcherServletInitializer
-
registerServletFilter
protected javax.servlet.FilterRegistration.Dynamic registerServletFilter(javax.servlet.ServletContext servletContext, javax.servlet.Filter filter)Append this filter after other registeredFilter- Overrides:
registerServletFilterin classorg.springframework.web.servlet.support.AbstractDispatcherServletInitializer- Parameters:
servletContext- the servlet context to register filters withfilter- the filter to be registered- Returns:
- the filter registration
-
-