Skip to content
Sharp

Spring Core · interview question

Which bean scope would you use in a Spring application to ensure a new bean instance is created for each HTTP request?

Multiple choiceMediumchapter-9-curatedpremiumspring-coreapplication-properties
Choose one answer
Answer and explanation

Correct answer

D. Request

Why

The 'Request' scope is used to create a new bean instance for each HTTP request. This is particularly useful in web applications where you need separate instances for each client interaction.

Test yourself on Spring Core

A free test with instant, explained results. No account needed.

Start free test
All Spring Core questions →