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
FieldsFields inherited from class org.springframework.web.servlet.support.AbstractDispatcherServletInitializer
DEFAULT_SERVLET_NAMEFields inherited from class org.springframework.web.context.AbstractContextLoaderInitializer
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidconfigure(AcrossWebApplicationContext applicationContext) Configure the ApplicationContext before it is initialized.protected org.springframework.web.context.WebApplicationContextprotected org.springframework.web.context.WebApplicationContextCreates a default empty WebApplicationContext for the servlet itself.protected voidcustomizeRegistration(jakarta.servlet.ServletRegistration.Dynamic registration) protected voidextendServletContext(jakarta.servlet.ServletContext servletContext) Extension point for extending the ServletContext during initialization.protected String[]voidonStartup(jakarta.servlet.ServletContext servletContext) protected voidregisterContextLoaderListener(jakarta.servlet.ServletContext servletContext) Methods inherited from class org.springframework.web.servlet.support.AbstractDispatcherServletInitializer
createDispatcherServlet, getServletApplicationContextInitializers, getServletFilters, getServletName, isAsyncSupported, registerDispatcherServlet, registerServletFilterMethods 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:
onStartupin interfaceorg.springframework.web.WebApplicationInitializer- Overrides:
onStartupin classorg.springframework.web.servlet.support.AbstractDispatcherServletInitializer- Throws:
jakarta.servlet.ServletException
-
registerContextLoaderListener
protected void registerContextLoaderListener(jakarta.servlet.ServletContext servletContext) - Overrides:
registerContextLoaderListenerin classorg.springframework.web.context.AbstractContextLoaderInitializer
-
createRootApplicationContext
protected org.springframework.web.context.WebApplicationContext createRootApplicationContext()- Specified by:
createRootApplicationContextin 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:
createServletApplicationContextin classorg.springframework.web.servlet.support.AbstractDispatcherServletInitializer
-
getServletMappings
- Specified by:
getServletMappingsin 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:
customizeRegistrationin classorg.springframework.web.servlet.support.AbstractDispatcherServletInitializer
-