How do you define the scope of a bean?
Answer / Vikash
The scope of a Spring bean can be defined using the scope attribute in the bean definition. The available scopes are singleton, prototype, request, session, application, and webSocket. Singleton creates a single instance that is shared among all beans, while prototype creates a new instance every time it's requested.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the meaning of ioc in spring?
How does dependency injection work in spring?
What are some of the design patterns used in the spring framework?
What are advice, aspect, join-point and point cut in spring?
Is entitymanager thread safe?
What is the web module?
Why do we use aop in spring?
How does the ioc work?
What is an advice? What are the different types of advices?
Is spring data jpa an orm?
How to inject a java.util.properties into a spring bean?
Explain the term proxy?