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.WebApplicationInitializer
Core 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.FrameworkServlet
createDispatcherServlet(org.springframework.web.context.WebApplicationContext servletAppContext)
Create aRestDispatcherServlet
with the specifiedWebApplicationContext
and context config location:com.emc.documentum.rest.context.jc.protected org.springframework.web.context.WebApplicationContext
createRootApplicationContext()
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 String
getServletName()
Return the name under which theDispatcherServlet
will be registered.void
onStartup(javax.servlet.ServletContext servletContext)
protected javax.servlet.FilterRegistration.Dynamic
registerServletFilter(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:
getRootConfigClasses
in classorg.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer
-
getServletConfigClasses
protected Class<?>[] getServletConfigClasses()
- Specified by:
getServletConfigClasses
in classorg.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer
-
getServletMappings
protected String[] getServletMappings()
Specify the servlet mapping(s)to be '/*' for theDispatcherServlet
;- Specified by:
getServletMappings
in 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:
onStartup
in interfaceorg.springframework.web.WebApplicationInitializer
- Overrides:
onStartup
in classorg.springframework.web.servlet.support.AbstractDispatcherServletInitializer
- Throws:
javax.servlet.ServletException
-
createRootApplicationContext
protected org.springframework.web.context.WebApplicationContext createRootApplicationContext()
- Overrides:
createRootApplicationContext
in classorg.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer
-
getServletFilters
protected javax.servlet.Filter[] getServletFilters()
Specify filters to add and map to theDispatcherServlet
.- Overrides:
getServletFilters
in 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 theDispatcherServlet
will be registered. Defaults toSERVLET_NAME
.- Overrides:
getServletName
in 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 aRestDispatcherServlet
with the specifiedWebApplicationContext
and context config location:com.emc.documentum.rest.context.jc.Note: This allows for any
FrameworkServlet
subclass as of 4.2.3. Previously, it insisted on returning aDispatcherServlet
or subclass thereof.- Overrides:
createDispatcherServlet
in 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:
registerServletFilter
in classorg.springframework.web.servlet.support.AbstractDispatcherServletInitializer
- Parameters:
servletContext
- the servlet context to register filters withfilter
- the filter to be registered- Returns:
- the filter registration
-
-