Spring Beans
1. What are Spring Beans? Spring Bean is an object that is managed by the Spring Framework. A Spring Bean is instantiated, configured, and managed by the Spring Framework container (IoC container). You can define the beans in a configuration file or use annotations. The beans are then instantiated by the Spring IoC container, added to the Spring ApplicationContext, and injected into your application at the points they are asked for. 2. What are the different Bean scopes? Beans, which are Spring-managed Java classes are created and wired by the Spring Framework. Spring allows you to define how these beans will be created. The scope of the bean is one of those definitions. To specify the bean scope, you can either use Spring annotations or define it in the configuration file. Spring Framework supports the following scopes: Singleton: If you use this bean scope, no matter how many times you call the getBean() method, the same bean instance will be returned. This is the de...