public interface ServletContextInitializer
context
programmatically. Unlike WebApplicationInitializer
, classes that implement this
interface (and do not implement WebApplicationInitializer
) will not be
detected by SpringServletContainerInitializer
and hence will not be
automatically bootstrapped by the Servlet container.
This interface is primarily designed to allow ServletContextInitializer
s to be
managed by Spring and not the Servlet container.
For configuration examples see WebApplicationInitializer
.
WebApplicationInitializer
Modifier and Type | Method and Description |
---|---|
void |
onStartup(ServletContext servletContext)
Configure the given
ServletContext with any servlets, filters, listeners
context-params and attributes necessary for initialization. |
void onStartup(ServletContext servletContext) throws ServletException
ServletContext
with any servlets, filters, listeners
context-params and attributes necessary for initialization.servletContext
- the ServletContext
to initializeServletException
- if any call against the given ServletContext
throws a ServletException
Copyright © 2014. All rights reserved.