Class AbstractAcrossServletInitializer
java.lang.Object
org.springframework.web.context.AbstractContextLoaderInitializer
org.springframework.web.servlet.support.AbstractDispatcherServletInitializer
com.foreach.across.modules.web.servlet.AbstractAcrossServletInitializer
- All Implemented Interfaces:
org.springframework.web.WebApplicationInitializer
public abstract class AbstractAcrossServletInitializer
extends org.springframework.web.servlet.support.AbstractDispatcherServletInitializer
Initializes a single dispatcher servlet with a root Application context that is initialized upon creation.
This allows any modules in the root Application context to extend the ServletContext.
Servlet 3 environments only need to extend this initializer and configure the application context with one or more configuration classes or locations. Any AcrossContext bootstrapped in the ApplicationContext will be able to extend the ServletContext.
- Author:
- Arne Vandamme
-
Field Summary
Fields inherited from class org.springframework.web.servlet.support.AbstractDispatcherServletInitializer
DEFAULT_SERVLET_NAME
Fields inherited from class org.springframework.web.context.AbstractContextLoaderInitializer
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
configure
(AcrossWebApplicationContext applicationContext) Configure the ApplicationContext before it is initialized.protected org.springframework.web.context.WebApplicationContext
protected org.springframework.web.context.WebApplicationContext
Creates a default empty WebApplicationContext for the servlet itself.protected void
customizeRegistration
(jakarta.servlet.ServletRegistration.Dynamic registration) protected void
extendServletContext
(jakarta.servlet.ServletContext servletContext) Extension point for extending the ServletContext during initialization.protected String[]
void
onStartup
(jakarta.servlet.ServletContext servletContext) protected void
registerContextLoaderListener
(jakarta.servlet.ServletContext servletContext) Methods inherited from class org.springframework.web.servlet.support.AbstractDispatcherServletInitializer
createDispatcherServlet, getServletApplicationContextInitializers, getServletFilters, getServletName, isAsyncSupported, registerDispatcherServlet, registerServletFilter
Methods inherited from class org.springframework.web.context.AbstractContextLoaderInitializer
getRootApplicationContextInitializers
-
Field Details
-
DYNAMIC_INITIALIZER
- See Also:
-
ATTRIBUTE_DYNAMIC_MULTIPART_CONFIG
- See Also:
-
-
Constructor Details
-
AbstractAcrossServletInitializer
public AbstractAcrossServletInitializer()
-
-
Method Details
-
onStartup
public void onStartup(jakarta.servlet.ServletContext servletContext) throws jakarta.servlet.ServletException - Specified by:
onStartup
in interfaceorg.springframework.web.WebApplicationInitializer
- Overrides:
onStartup
in classorg.springframework.web.servlet.support.AbstractDispatcherServletInitializer
- Throws:
jakarta.servlet.ServletException
-
registerContextLoaderListener
protected void registerContextLoaderListener(jakarta.servlet.ServletContext servletContext) - Overrides:
registerContextLoaderListener
in classorg.springframework.web.context.AbstractContextLoaderInitializer
-
createRootApplicationContext
protected org.springframework.web.context.WebApplicationContext createRootApplicationContext()- Specified by:
createRootApplicationContext
in classorg.springframework.web.context.AbstractContextLoaderInitializer
-
configure
Configure the ApplicationContext before it is initialized.- Parameters:
applicationContext
- AcrossWebApplicationContext that contains the main Across context configuration.
-
createServletApplicationContext
protected org.springframework.web.context.WebApplicationContext createServletApplicationContext()Creates a default empty WebApplicationContext for the servlet itself.- Specified by:
createServletApplicationContext
in classorg.springframework.web.servlet.support.AbstractDispatcherServletInitializer
-
getServletMappings
- Specified by:
getServletMappings
in classorg.springframework.web.servlet.support.AbstractDispatcherServletInitializer
-
extendServletContext
protected void extendServletContext(jakarta.servlet.ServletContext servletContext) Extension point for extending the ServletContext during initialization.- Parameters:
servletContext
- ServletContext while initialization is busy.
-
customizeRegistration
protected void customizeRegistration(jakarta.servlet.ServletRegistration.Dynamic registration) - Overrides:
customizeRegistration
in classorg.springframework.web.servlet.support.AbstractDispatcherServletInitializer
-