Spring Beans: Lifecycle & Scopes
Learn Spring Beans: Lifecycle & Scopes (Spring Framework Fundamentals, Spring Boot) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
A Bean Is Just an Object the Container Owns The word sounds like it implies something special about the class. It does not. A Spring bean is an ordinary Java object with one distinguishing property: Spring created it and Spring is holding on to it. Two objects of the same class can differ on this. Only the first of these is a bean: