| Simple FactoryBean that exposes the ServletContext for bean references.
Can be used as alternative to implementing the ServletContextAware
callback interface. Allows for passing the ServletContext reference
to a constructor argument or any custom bean property.
Note that there's a special FactoryBean for exposing a specific
ServletContext attribute, named ServletContextAttributeFactoryBean.
So if all you need from the ServletContext is access to a specific
attribute, ServletContextAttributeFactoryBean allows you to expose
a constructor argument or bean property of the attribute type,
which is a preferable to a dependency on the full ServletContext.
author: Juergen Hoeller since: 1.1.4 See Also: javax.servlet.ServletContext See Also: org.springframework.web.context.ServletContextAware See Also: ServletContextAttributeFactoryBean |