Interview Question
Java DevelopersCountry: India
Interview Type: In-Person
Singleton bean in Spring and Singleton pattern is quite different. Singleton pattern says that one and only one instance of a particular class will ever be created per classloader.
The scope of Spring singleton is described as per container per bean. It is the scope of bean definition to a single object instance per Spring IoC container. The default scope in Spring in Singleton.
clone() will create another instance of class.
- Sanjay Singh August 25, 2014