Request scope
Request scope is a Spring bean scope in which a distinct bean instance is created for each HTTP request.
Spring Start Here, Second Edition
A request-scoped bean is a Spring-managed bean with a distinct instance for each HTTP request.
- How it is used
- Uses request scope to keep web-app data and logic tied to the HTTP request that needs them.
- How deep it goes
- Defines the lifecycle, weighs practical considerations, and works through a Spring login example using @RequestScope.
- Examples
- Demonstrates a LoginProcessor that checks submitted credentials and a controller that displays the login result.
- What you can do after
- Apply it via Spring’s @RequestScope annotation to keep bean state specific to one HTTP request.
Read how Spring Start Here, Second Edition explains request scope →
Spring in Action, Sixth Edition
A Spring bean scope in which a separate bean instance is created for each HTTP request.
- How it is used
- Uses per-request beans to access authenticated user context while constructing an OAuth2-aware REST client.
- How deep it goes
- Explains bean timing, SecurityContext access, client validation, token extraction, and request interception through complete configuration.
- Examples
- Demonstrates IngredientService, RestIngredientService, taco-admin-client, bearer authorization headers, and the Taco Cloud API.
- What you can do after
- Operate/configure a request-scoped service that forwards the current OAuth2 access token through RestTemplate.
Read how Spring in Action, Sixth Edition explains request scope →
Related concepts
- @RequestScoped annotationconfigured by · The @RequestScoped annotation marks a Spring bean as having request scope.
- bean scopekind of · A dependency-injection scope defines the lifetime and reuse of a service or bean instance within a bounded context.
- session scopecontrasts with · Session scope is a Spring bean scope in which Spring creates one bean instance for each HTTP session, allowing requests from the same client to share it.
- Spring beankind of · A Spring bean is an object instantiated, configured, and managed by the Spring container.
- concurrencycontrasts with · Concurrency is the structuring or execution of multiple computational activities so their progress overlaps in time, whether or not they run simultaneously.
Questions about request scope
What is request scope?
Request scope is a Spring bean scope in which a distinct bean instance is created for each HTTP request.
Which Manning books explain request scope?
Spring Start Here, Second Edition and Spring in Action, Sixth Edition.
What is the difference between request scope and session scope?
Request scope is a Spring bean scope in which a distinct bean instance is created for each HTTP request. Session scope is a Spring bean scope in which Spring creates one bean instance for each HTTP session, allowing requests from the same client to share it.
What is request scope a kind of?
Request scope is a kind of bean scope. A dependency-injection scope defines the lifetime and reuse of a service or bean instance within a bounded context.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

