Different Types of Beans:
1. Singleton Bean: A singleton bean is a single instance of a bean per Spring IoC container. It is created once and shared by multiple requests or references within the application context.
2. Prototype Bean: A prototype bean is a new instance of a bean created each time it is requested from the Spring IoC container. Each request for a prototype bean results in the creating of a new model.
3. Request Bean: A request bean is tied to the lifecycle of an HTTP request in web applications. It is created and made available for a single HTTP request and is destroyed afterward.
4. Session Bean: A session bean is tied to the lifecycle of an HTTP session in web applications. It is created when a new session is started and remains active until it is invalidated or expired.
5. Application Bean: An application bean is tied to the lifecycle of a Spring application context. It is created when the application context is initialized and destroyed when it is closed.
These are some commonly used types of beans in Spring. Each bean type has its lifecycle and scope, providing flexibility in managing object instances based on the application’s requirements.
I'm sharing more