Close
« Tutorial

Spring MVC - Request Scoped Bean MCQ

0/13
0 ✓
0 ✗

1. What does the request scope mean for a Spring bean?

2. Where is the request scope valid?

3. Which scope annotation makes a bean live for a single HTTP request?

@Component
// Add scope annotation here
public class UserContext { }

4. What is the default scope of a Spring bean when no scope is specified?

5. Several beans use a request scoped bean during the same HTTP request. How many instances of the request scoped bean are used?

6. Two different HTTP requests arrive at the application. Do they share the same request scoped bean instance?

7. What is a common use of a request scoped bean?

8. What is one advantage of using a request scoped bean to share data?

9. How long does a request scoped bean instance live?

10. Why is it a problem to inject a request scoped bean into a singleton bean when no scoped proxy is used?

11. How can a singleton bean get a fresh request scoped bean for each request?

12. Which statement about request scoped beans is correct?

Join