How to define the scope of a bean?
Answer / Akhand Pratap Kaushal
In Spring Framework, you can define the scope of a bean using the scope attribute in the configuration file or annotation. The possible scopes are singleton (by default), prototype, request, session, application, and webSocket.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is compile time weaving?
Explain the spring framework.
How does spring do dependency injection?
What is @componentscan in spring boot? : Spring Boot
Which is the best way of injecting beans and why ?
When are declarative and programmatic transaction management used?
What is the purpose of using bindingresults?
What does the joint point denote?
What is servlet in spring?
Why spring controller is singleton?
What is autoproxy in spring?
What is jdbc abstraction and dao module?