open class ServletContextAttributeFactoryBean : FactoryBean<Any>, ServletContextAware
FactoryBean that fetches a specific, existing ServletContext attribute. Exposes that ServletContext attribute when used as bean reference, effectively making it available as named Spring bean instance.
Intended to link in ServletContext attributes that exist before the startup of the Spring application context. Typically, such attributes will have been put there by third-party web frameworks. In a purely Spring-based web application, no such linking in of ServletContext attributes will be necessary.
NOTE: As of Spring 3.0, you may also use the "contextAttributes" default bean which is of type Map, and dereference it using an "#{contextAttributes.myKey}" expression to access a specific attribute by name.
Author
Juergen Hoeller
Since
1.1.4
See Also
org.springframework.web.context.WebApplicationContext#CONTEXT_ATTRIBUTES_BEAN_NAMEServletContextParameterFactoryBean
ServletContextAttributeFactoryBean()
FactoryBean that fetches a specific, existing ServletContext attribute. Exposes that ServletContext attribute when used as bean reference, effectively making it available as named Spring bean instance. Intended to link in ServletContext attributes that exist before the startup of the Spring application context. Typically, such attributes will have been put there by third-party web frameworks. In a purely Spring-based web application, no such linking in of ServletContext attributes will be necessary. NOTE: As of Spring 3.0, you may also use the "contextAttributes" default bean which is of type Map, and dereference it using an "#{contextAttributes.myKey}" expression to access a specific attribute by name. |
open fun getObject(): Any |
|
open fun getObjectType(): Class<*> |
|
open fun isSingleton(): Boolean |
|
open fun setAttributeName(attributeName: String): Unit
Set the name of the ServletContext attribute to expose. |
|
open fun setServletContext(servletContext: ServletContext): Unit |