diff --git a/framework-docs/modules/ROOT/pages/core/beans/factory-scopes.adoc b/framework-docs/modules/ROOT/pages/core/beans/factory-scopes.adoc index 8d8e3d0cea..6049003235 100644 --- a/framework-docs/modules/ROOT/pages/core/beans/factory-scopes.adoc +++ b/framework-docs/modules/ROOT/pages/core/beans/factory-scopes.adoc @@ -324,7 +324,6 @@ Kotlin:: - [[beans-factory-scopes-application]] === Application Scope @@ -374,7 +373,6 @@ Kotlin:: - [[beans-factory-scopes-websocket]] === WebSocket Scope @@ -384,7 +382,6 @@ xref:web/websocket/stomp/scope.adoc[WebSocket scope] for more details. - [[beans-factory-scopes-other-injection]] === Scoped Beans as Dependencies @@ -544,6 +541,19 @@ see xref:core/aop/proxying.adoc[Proxying Mechanisms]. +[[beans-factory-scopes-injection]] +=== Injecting Request/Session References Directly + +As an alternative to factory scopes, a Spring `WebApplicationContext` also supports +the injection of `HttpServletRequest`, `HttpServletResponse`, `HttpSession`, +`WebRequest` and (if JSF is present) `FacesContext` and `ExternalContext` into +Spring-managed beans, simply through type-based autowiring next to regular injection +points for other beans. Spring generally injects proxies for such request and session +objects which has the advantage of working in singleton beans and serializable beans +as well, similar to scoped proxies for factory-scoped beans. + + + [[beans-factory-scopes-custom]] == Custom Scopes