How do beans become 'singleton' or prototype?



How do beans become 'singleton' or prototype?..

Answer / Prakash Ranjan Shukla

Beans become Singleton by default in Spring Framework unless explicitly defined as prototype. To create a prototype bean, the scope attribute should be set to prototype in the configuration file.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Spring Framework Interview Questions

How can I manage transactions in spring?

1 Answers  


What is the difference between java singleton and spring singleton?

1 Answers  


How do you define the scope of a bean?

1 Answers  


What is an advice?

1 Answers  


What is the default scope of spring?

1 Answers  


What is viewresolver in spring?

1 Answers  


What is a dispatcherservlet in spring boot? : Spring Boot

1 Answers  


What is the difference between ioc and dependency injection in spring?

1 Answers  


Explain the concept of root application context in spring mvc along with its loading process.

1 Answers  


How does dependency injection work in spring?

1 Answers  


Why is spring default scope singleton?

1 Answers  


How do you teach annotations?

1 Answers  


Categories