类 ContextCleanupListener
- java.lang.Object
- org.springframework.web.context.ContextCleanupListener
- 所有已实现的接口:
EventListener
,ServletContextListener
public class ContextCleanupListener extends Object implements ServletContextListener
Web application listener that cleans up remaining disposable attributes in the ServletContext, i.e. attributes which implementDisposableBean
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.- 从以下版本开始:
- 3.0
- 作者:
- Juergen Hoeller
- 另请参阅:
ServletContextScope
,ContextLoaderListener
构造器概要
构造器 构造器 说明 ContextCleanupListener()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
contextDestroyed(ServletContextEvent event)
Receives notification that the ServletContext is about to be shut down.void
contextInitialized(ServletContextEvent event)
Receives notification that the web application initialization process is starting.
构造器详细资料
ContextCleanupListener
public ContextCleanupListener()
方法详细资料
contextInitialized
public void contextInitialized(ServletContextEvent event)
从接口复制的说明:javax.servlet.ServletContextListener
Receives notification that the web application initialization process is starting.All ServletContextListeners are notified of context initialization before any filters or servlets in the web application are initialized.
- 指定者:
contextInitialized
在接口中ServletContextListener
- 参数:
event
- the ServletContextEvent containing the ServletContext that is being initialized
contextDestroyed
public void contextDestroyed(ServletContextEvent event)
从接口复制的说明:javax.servlet.ServletContextListener
Receives notification that the ServletContext is about to be shut down.All servlets and filters will have been destroyed before any ServletContextListeners are notified of context destruction.
- 指定者:
contextDestroyed
在接口中ServletContextListener
- 参数:
event
- the ServletContextEvent containing the ServletContext that is being destroyed