In Chapter 3, Dependency Injection with Google Guice, we learned about different Spring modules along with dependency injection. In Spring, beans are the backbone of an application, and they are managed by a Spring IOC container. A bean is a class or object that is created using the configuration of metadata that we can pass to an IOC container. Before learning about scope, let's define a bean in Spring.
Introduction to bean scopes in Spring
Bean definitionÂ
The metadata of a bean has its own properties with independent bean definitions. Some of these bean definitions are as follows:
- Class: This will be used to create a bean, and it is mandatory to mention a class name for which we are supposed to...