Tagged articles
7 articles
Page 1 of 1
Java Architect Essentials
Java Architect Essentials
Nov 30, 2021 · Backend Development

How Spring Solves Circular Dependencies and the Underlying Essence

This article explains Spring's three‑level cache mechanism for breaking circular dependencies in singleton beans, demonstrates a simplified implementation with Java code, draws an analogy to the classic Two‑Sum algorithm, and highlights the core idea behind dependency injection.

Two Sumcircular-dependencydependency-injection
0 likes · 9 min read
How Spring Solves Circular Dependencies and the Underlying Essence
Programmer DD
Programmer DD
Jun 25, 2021 · Backend Development

How Spring Solves Circular Dependencies: Inside the Three‑Level Cache

This article explains why Spring’s default singleton beans can handle circular references, describes the three‑level cache mechanism that makes it possible, shows prototype limitations, provides a minimal implementation example, and even relates the solution to the classic two‑sum algorithm.

JavaThree-level CacheTwo Sum
0 likes · 9 min read
How Spring Solves Circular Dependencies: Inside the Three‑Level Cache
Code Ape Tech Column
Code Ape Tech Column
Jan 7, 2021 · Backend Development

How Spring Solves Circular Dependencies: Inside the Three‑Cache Mechanism

This article explains how Spring resolves circular dependencies for singleton beans using a three‑level cache, contrasts it with prototype limitations, provides a minimal container implementation that mimics the mechanism, and draws an analogy to the classic two‑sum algorithm to illustrate the core caching principle.

BackendJavaThree Cache
0 likes · 11 min read
How Spring Solves Circular Dependencies: Inside the Three‑Cache Mechanism
Java Captain
Java Captain
May 4, 2020 · Backend Development

How Spring Solves Circular Dependencies and the Underlying Essence

This article explains how Spring resolves circular dependencies for singleton beans using a three‑level cache, demonstrates a simple prototype implementation that mimics Spring's behavior, and relates the problem to the classic two‑sum algorithm to reveal its fundamental nature.

JavaTwo Sumbean
0 likes · 9 min read
How Spring Solves Circular Dependencies and the Underlying Essence