Spring puts each bean instance in a scope. What is the default scope? (Choose the best answer.)
Spring puts each bean instance in a scope. What is the default scope? (Choose the best answer.)
In Spring, the default scope for a bean is 'singleton'. This means that the Spring container creates exactly one instance of the bean, and all requests for that bean will return the same instance. The prototype scope creates a new bean instance on each request, and the request and session scopes are typically used in web applications, binding the bean's lifecycle to an HTTP request or session, respectively.
The singleton scope is the default scope in Spring. https://docs.spring.io/spring-framework/docs/3.0.0.M3/reference/html/ch04s04.html#:~:text=The%20singleton%20scope%20is%20the%20default%20scope%20in%20Spring.
Quote “The singleton scope is the default scope in Spring.” at https://docs.spring.io/spring-framework/docs/3.0.0.M3/reference/html/ch04s04.html at Section 4.4.1 , paragraph 3.
Obviously B, Singleton