open class ServletContextScope : Scope, DisposableBean
Scope wrapper for a ServletContext, i.e. for global web application attributes.
This differs from traditional Spring singletons in that it exposes attributes in the ServletContext. Those attributes will get destroyed whenever the entire application shuts down, which might be earlier or later than the shutdown of the containing Spring ApplicationContext.
The associated destruction mechanism relies on a org.springframework.web.context.ContextCleanupListener being registered in web.xml. Note that org.springframework.web.context.ContextLoaderListener includes ContextCleanupListener's functionality.
This scope is registered as default scope with key "application".
Author
Juergen Hoeller
Since
3.0
See Also
org.springframework.web.context.ContextCleanupListener
ServletContextScope(servletContext: ServletContext)
Create a new Scope wrapper for the given ServletContext. |
open fun destroy(): Unit
Invoke all registered destruction callbacks. To be called on ServletContext shutdown. |
|
open fun get(name: String, objectFactory: ObjectFactory<*>): Any |
|
open fun getConversationId(): String |
|
open fun registerDestructionCallback(name: String, callback: Runnable): Unit |
|
open fun remove(name: String): Any |
|
open fun resolveContextualObject(key: String): Any |