What is difference between singleton and prototype bean?
Answer / Pratigya Chaudhary
A Singleton Bean in Spring Framework is created only once per Spring container, while a Prototype Bean is created every time it is requested. This makes Singletons suitable for objects that are expensive to create but don't change during the application lifecycle, whereas Prototypes are suitable for objects that can be modified or recreated as needed.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between spring mvc and spring rest?
What is spring controller?
What is crud in spring?
Is spring easy to learn?
How to do setter injection in spring using annotations?
Does closing connection close resultset?
What is the use of spring dao module?
What is rowmapper in spring jdbc?
What does autowired mean?
What is spring in java?
What is delegatingvariableresolver?
Can we extend pojo class?