Different spring bean scope.



Different spring bean scope...

Answer / Dawer Husain

Spring Framework supports several bean scopes:
1. Singleton (default): A single instance of a bean is created when the container starts, and it's reused throughout the application lifecycle.
2. Prototype: A new instance is created every time a bean is requested.
3. Request: A single instance per servlet request.
4. Session: A single instance per HTTP session.
5. Application: A single instance per SpringApplication context.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Spring Framework Interview Questions

What is the scope of stateless bean in spring?

1 Answers  


What do you mean by bean autowiring in spring?

1 Answers  


Why do we need ioc?

1 Answers  


What are the different types of injection in spring?

1 Answers  


What are bean wiring and @autowired annotation?

1 Answers  


What is ioc full form?

1 Answers  


What is the difference between @qualifier and @primary?

1 Answers  


Who created the dao? : Spring Boot

1 Answers  


What is the meaning of stereotype annotations in spring?

1 Answers  


What is the ioc in spring?

1 Answers  


Does ienumerable support lazy loading?

1 Answers  


What is the purpose of @autowired in spring?

1 Answers  


Categories