Class ContextCleanupListener
java.lang.Object
org.springframework.web.context.ContextCleanupListener
- All Implemented Interfaces:
jakarta.servlet.ServletContextListener, EventListener
public class ContextCleanupListener
extends Object
implements jakarta.servlet.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.- Since:
- 3.0
- Author:
- Juergen Hoeller
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcontextDestroyed(jakarta.servlet.ServletContextEvent event) voidcontextInitialized(jakarta.servlet.ServletContextEvent event)
-
Constructor Details
-
ContextCleanupListener
public ContextCleanupListener()
-
-
Method Details
-
contextInitialized
public void contextInitialized(jakarta.servlet.ServletContextEvent event) - Specified by:
contextInitializedin interfacejakarta.servlet.ServletContextListener
-
contextDestroyed
public void contextDestroyed(jakarta.servlet.ServletContextEvent event) - Specified by:
contextDestroyedin interfacejakarta.servlet.ServletContextListener
-