Creating a Simple Spring Application with Dependency Injection
Basic Hello World Implementation
Create a simple POJO class with a string property:
public class Greeting {
private String message;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
@Override
public String toString() {
...
Posted on Tue, 22 Sep 2026 16:27:05 +0000 by SyndicatE
Introduction to Unity Dependency Injection
Unity is a lightweight and extensible dependency injection (DI) container developed by Microsoft's Patterns & Practices team. It supports three common DI modes: Constructor Injection, Property Injection, and Method Call Injection. The latest version, 1.2, can be downloaded from the Microsoft open-source site at Unity Codeplex. By using Unit ...
Posted on Fri, 18 Sep 2026 16:13:49 +0000 by Chantal
Spring 6 IoC Container Deep Dive
IoC Container
Inversion of Control
The IoC container serves as the practical implementation of the IoC design pattern in Spring. Components managed by the IoC container are referred to as beans. Before creating a bean, the IoC container must be instantiated first. Spring provides two primary implementations:
① BeanFactory
The fundamental implem ...
Posted on Thu, 17 Sep 2026 16:55:10 +0000 by Travis Estill
Dependency Injection in .NET Core Using Autofac
Official Documentation
https://autofaccn.readthedocs.io/zh/latest/index.html
Creating a .NET Core Console Application
Registering Types – Example One
Define an interface IPerson
public interface IPerson
{
void Introduce();
}
Implemant the interface with a Worker class
public class Worker : IPerson
{
public void Introduce()
{
...
Posted on Fri, 11 Sep 2026 16:39:24 +0000 by Brad420
Spring Source Analysis: Bean Lifecycle (Part 3)
In previous articles, we've covered the foundational steps for bean preparation, including bean definition processing and FactoryBean identification. Building upon this knowledge, we can now dive deeper into the implementation logic of the getBean method and gain better insights into how the createBean method works.
Usage of getBean
Before divi ...
Posted on Fri, 11 Sep 2026 16:31:00 +0000 by nihal
Implementing Dependency Injection in Spring: Setter vs. Constructor Injection
Dependency Injection (DI) is a core pattern where an object's dependencies are provided externally rather than the object creating them itself.
Constructor Injection involves providing dependencies through a class's constructor at the time of object creation. This ensures the object is fully initialized and immutable if dependencies are declare ...
Posted on Sat, 05 Sep 2026 16:44:54 +0000 by andrewgauger
Spring Framework Integration with MyBatis: Core Implementation Mechanisms
Circular Dependency Resolution in Spring
Understanding Circular Dependencies
Circular dependencies occur when two or more beans depend on each other, creating a dependency cycle. Spring handles this through a three-level caching mechanism.
Early AOP and Caching Mechanism
The earlySingletonObjects cache (second-level) stores partially constructe ...
Posted on Mon, 31 Aug 2026 16:19:47 +0000 by kiwiwilliam
Understanding IActionFilter in ASP.NET Core Web API
This article provides an overview of IActionFilter in ASP.NET Core Web API, focusing on its execution order, attribute usage, and registration methods. The environment used is VS2019 with ASP.NET Core 3.1.
Execution Order of IActionFilter
The filter is called after the controller's constructor is executed.
The OnActionExecuting method of IAct ...
Posted on Tue, 25 Aug 2026 16:21:48 +0000 by Xurion
Mastering Spring 5: From Core IoC to Reactive Web with WebFlux
Inversion of Control Container
Underlying Concepts
IoC shifts object creation and wiring responsibilities from application code to the container. The container relies on three main techniques: XML parsing, the factory pattern, and Java reflection. At startup, metadata (XML or annotations) is read, bean definitions are parsed, and the container ...
Posted on Mon, 24 Aug 2026 16:45:58 +0000 by moreshion
Building a Mini Vue: Implementing Observer, Watcher, and Compiler
Vue's source code implements dependency collection using the Observer pattern. It involves three main classes:
Dep: Acts as the observable target. Every data property has a Dep instance containing a subs queue (short for subscribers) that holds all Watcher instances depending on the data. When data changes, dep.notify() is called to inform all ...
Posted on Mon, 24 Aug 2026 16:25:35 +0000 by rcoursey