org.springframework.boot.context.embedded
Interface ServletContextInitializer

All Known Implementing Classes:
FilterRegistrationBean, RegistrationBean, ServletListenerRegistrationBean, ServletRegistrationBean

public interface ServletContextInitializer

Interface used to configure a Servlet 3.0+ 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 ServletContextInitializers to be managed by Spring and not the Servlet container.

For configuration examples see WebApplicationInitializer.

Author:
Phillip Webb
See Also:
WebApplicationInitializer

Method Summary
 void onStartup(javax.servlet.ServletContext servletContext)
          Configure the given ServletContext with any servlets, filters, listeners context-params and attributes necessary for initialization.
 

Method Detail

onStartup

void onStartup(javax.servlet.ServletContext servletContext)
               throws javax.servlet.ServletException
Configure the given ServletContext with any servlets, filters, listeners context-params and attributes necessary for initialization.

Parameters:
servletContext - the ServletContext to initialize
Throws:
javax.servlet.ServletException - if any call against the given ServletContext throws a ServletException


Copyright © 2013. All Rights Reserved.