spring-framework / org.springframework.web.context

Package org.springframework.web.context

Types

AbstractContextLoaderInitializer

abstract class AbstractContextLoaderInitializer : WebApplicationInitializer

Convenient base class for WebApplicationInitializer implementations that register a ContextLoaderListener in the servlet context.

The only method required to be implemented by subclasses is #createRootApplicationContext(), which gets invoked from #registerContextLoaderListener(ServletContext).

ContextCleanupListener

open class ContextCleanupListener : ServletContextListener

Web application listener that cleans up remaining disposable attributes in the ServletContext, i.e. attributes which implement DisposableBean and haven't been removed before. This is typically used for destroying objects in "application" scope, for which the lifecycle implies destruction at the very end of the web application's shutdown phase.

ContextLoaderListener

open class ContextLoaderListener : ContextLoader, ServletContextListener

Bootstrap listener to start up and shut down Spring's root WebApplicationContext. Simply delegates to ContextLoader as well as to ContextCleanupListener.

As of Spring 3.1, ContextLoaderListener supports injecting the root web application context via the #ContextLoaderListener(WebApplicationContext) constructor, allowing for programmatic configuration in Servlet 3.0+ environments. See org.springframework.web.WebApplicationInitializer for usage examples.

ServletConfigAware

interface ServletConfigAware : Aware

Interface to be implemented by any object that wishes to be notified of the ServletConfig (typically determined by the WebApplicationContext) that it runs in.

Note: Only satisfied if actually running within a Servlet-specific WebApplicationContext. Otherwise, no ServletConfig will be set.