Bean Auto-Wiring in Spring

1. Example: One Person and Two Pets 1.1 Cat class public class Cat { public void Cry() { System.out.println("Hiss"); } } 1.2 Dog class public class Dog { public void Cry() { System.out.println("Bark"); } } 1.3 People class public class People { private String name; private Cat cat ...

Posted on Tue, 12 May 2026 18:10:11 +0000 by frenchpl

Internal Mechanics of Spring Bean Instantiation and Constructor Resolution

Bean Instantiation WorkflowWithin the Spring Framework, the AbstractAutowireCapableBeanFactory class orchestrates the creation of bean instances. The core method responsible for this operation evaluates the RootBeanDefinition to determine the appropriate instantiation strategy. The execution flow follows a specific sequence of checks to identif ...

Posted on Sat, 09 May 2026 06:38:38 +0000 by Charles256

Java-Based Configuration in Spring 3.x and Beyond

Prior to the introduction of Spring 3.x, configuration in Spring primarily relied on XML files. With the release of Spring 3.x, JavaConfig was introduced as a method of configuration based on Java code. This approach allows developers to define Spring container configurations and manage Spring beans through Java code, eliminating the need for e ...

Posted on Fri, 08 May 2026 19:54:55 +0000 by EdN

Mastering Spring IoC Container and Dependency Injection

IoC Container Basics The Spring IoC (Inversion of Control) container manages application components and their lifecycle. Instead of creating objects manually, you define beans in configuration, and the container handles instantiation and wiring. Defining Beans A bean definition specifies how an object should be created and managed. In XML confi ...

Posted on Fri, 08 May 2026 14:14:11 +0000 by SBukoski