Principles, Patterns, and Dependency Injection
To understand the architecture of Spring Framework, it is necessary to first analyze how object-oriented software is designed in a clean and maintainable way. Developers often confuse terms such as principles, patterns, and frameworks; however, there is a very clear conceptual hierarchy between them.
Spring Ecosystem and Layered Architecture
In enterprise Java application development, one of the greatest advantages of using Spring Framework is that it handles the infrastructure or "plumbing" code (plumbing code). This allows development teams to focus their effort exclusively on business logic.
IoC Containers and Bean Configuration with XML
In previous documents, we explored Design Principles (SOLID, IoC, DIP) and Layered Architecture (Model-Repository-Service). Now we will dive into the technical mechanism that enables this assembly: the Spring IoC Container and the declarative definition of Spring Beans via XML files.
Scopes, Bean Lifecycle, and Standalone Execution
In the previous document, we learned how to define beans in XML and connect them using Dependency Injection. Now we will delve into the internal behavior of beans inside the IoC container: their Scopes, customizing their Lifecycle via initialization and destruction methods, and testing the architecture in a Standalone Java application using ClassPathXmlApplicationContext.
Spring Context Integration in Web Servlets
In previous documents, we learned to configure the Spring IoC Container using XML and run Standalone Java applications with ClassPathXmlApplicationContext. However, in a professional web environment using Servlets (jakarta.servlet), the web container (such as Apache Tomcat) handles multiple concurrent HTTP requests.
Weekly Slides
Official slides corresponding to Week 2: Spring Framework, Inversion of Control (IoC), Dependency Injection (DI), IoC Containers, and XML Beans.