Tagged articles
27 articles
Page 1 of 1
Architect's Guide
Architect's Guide
Apr 5, 2026 · Backend Development

Demystifying Spring Bean Creation: From Simple Instantiation to Three‑Level Caching

This article breaks down Spring's bean lifecycle, explaining the minimal creation steps, the role of BeanFactoryPostProcessor and BeanPostProcessor, how Spring resolves bean references, handles circular dependencies with three‑level caches, and clarifies common misconceptions about proxy generation.

PostProcessorThree-level Cachebean-lifecycle
0 likes · 14 min read
Demystifying Spring Bean Creation: From Simple Instantiation to Three‑Level Caching
Architect's Guide
Architect's Guide
Dec 21, 2025 · Backend Development

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

This article provides a detailed walkthrough of Spring's circular‑dependency resolution, explaining the three‑level cache mechanism, step‑by‑step bean creation flow, and the underlying source‑code logic, complete with diagrams and code examples for deep understanding.

Three-level Cacheaopcircular-dependency
0 likes · 12 min read
How Spring Solves Circular Dependencies: Inside the Three‑Level Cache
Architect
Architect
Dec 7, 2025 · Backend Development

How Spring Breaks Circular Dependencies: A Deep Dive into the 3‑Level Cache

This article explains Spring's circular‑dependency problem, introduces the three‑level cache (singletonObjects, earlySingletonObjects, singletonFactories), walks through the full execution flow with code examples, and clarifies why each cache level and AOP proxy factories are essential for correct bean initialization.

BeanFactoryThree-level Cacheaop
0 likes · 12 min read
How Spring Breaks Circular Dependencies: A Deep Dive into the 3‑Level Cache
IT Services Circle
IT Services Circle
Jul 21, 2025 · Backend Development

How Spring Uses a Three‑Level Cache to Resolve Circular Dependencies

This article explains Spring's circular dependency problem, distinguishes when such dependencies are harmless, shows why constructor injection can still fail, and details how Spring's three‑level cache with singleton, early‑singleton, and factory caches resolves setter‑based circular dependencies, including code examples and key source snippets.

Three-level Cachecircular-dependencydependency-injection
0 likes · 10 min read
How Spring Uses a Three‑Level Cache to Resolve Circular Dependencies
Architect's Guide
Architect's Guide
Jul 6, 2025 · Backend Development

Mastering Spring Bean Creation: From Simple Instantiation to 3‑Level Caching

This article explains Spring's bean lifecycle in depth, covering the minimal creation steps, the role of BeanFactoryPostProcessor and BeanPostProcessor, how Spring resolves references and circular dependencies, and why a three‑level cache is essential for reliable dependency injection.

PostProcessorThree-level Cachebackend-development
0 likes · 15 min read
Mastering Spring Bean Creation: From Simple Instantiation to 3‑Level Caching
Java Architect Essentials
Java Architect Essentials
Jul 6, 2025 · Backend Development

Mastering Spring Bean Circular Dependencies: 3 Real-World Solutions

This article explains Spring's three‑level cache mechanism for resolving bean circular dependencies, dives into why the cache alone is insufficient, and presents three practical scenarios with concrete solutions such as redesigning constructors, using @Lazy, and handling AOP proxy consistency.

BackendThree-level Cachebean
0 likes · 14 min read
Mastering Spring Bean Circular Dependencies: 3 Real-World Solutions
Cognitive Technology Team
Cognitive Technology Team
Mar 31, 2025 · Backend Development

Understanding Spring's Three-Level Cache Mechanism

The article explains Spring's three-level cache design—including singletonObjects, earlySingletonObjects, and singletonFactories—how it resolves circular bean dependencies, enables lazy initialization and proxy creation, outlines the workflow, and discusses its limitations and practical solutions.

Three-level Cachebackend-developmentbean-lifecycle
0 likes · 7 min read
Understanding Spring's Three-Level Cache Mechanism
Architect's Guide
Architect's Guide
Dec 6, 2024 · Backend Development

Why Spring Requires a Three‑Level Cache to Resolve Circular Dependencies Instead of a Two‑Level Cache

This article explains how Spring's bean lifecycle uses a three‑level cache (singletonObjects, earlySingletonObjects, singletonFactories) to break circular dependencies, especially when AOP proxies are involved, and why a two‑level cache alone cannot guarantee correct singleton behavior.

Three-level Cacheaopbackend-development
0 likes · 10 min read
Why Spring Requires a Three‑Level Cache to Resolve Circular Dependencies Instead of a Two‑Level Cache
Architect
Architect
Apr 28, 2024 · Backend Development

Understanding Spring's Circular Dependency Resolution with a Three‑Level Cache

This article explains how Spring solves circular dependencies by using a three‑level cache system, walks through the underlying source‑code execution flow, clarifies the purpose of each cache level, and discusses why the design is essential for AOP‑enabled beans.

BeanFactoryThree-level Cacheaop
0 likes · 12 min read
Understanding Spring's Circular Dependency Resolution with a Three‑Level Cache
政采云技术
政采云技术
Dec 12, 2023 · Backend Development

Understanding Spring's Circular Dependency Resolution via Three-Level Caches

This article explains how Spring handles common circular dependencies between singleton Beans by employing a three‑level cache (singletonObjects, earlySingletonObjects, singletonFactories), detailing the prerequisites, cache structures, workflow, and key source code snippets that illustrate the underlying mechanism.

Three-level Cachebackend-developmentbean
0 likes · 10 min read
Understanding Spring's Circular Dependency Resolution via Three-Level Caches
Top Architect
Top Architect
Jul 19, 2022 · Backend Development

How Spring Resolves Circular Dependencies Using Early Exposure and Three‑Level Caches

The article explains Spring's three‑level cache mechanism—singletonObjects, earlySingletonObjects, and singletonFactories—and how early exposure combined with BeanPostProcessor hooks enables the framework to break circular dependencies while still applying AOP proxies before full bean initialization.

BeanPostProcessorThree-level Cacheaop
0 likes · 13 min read
How Spring Resolves Circular Dependencies Using Early Exposure and Three‑Level Caches
Top Architect
Top Architect
Jun 12, 2022 · Backend Development

How Spring Resolves Circular Dependencies Using Early Exposure and a Three‑Level Cache

This article explains Spring's circular‑dependency solution, detailing the early‑exposure mechanism, the three‑level cache (singletonObjects, earlySingletonObjects, singletonFactories), how BeanPostProcessors and AOP proxies interact during bean creation, and why the third‑level cache is essential for correct bean wiring.

BeanPostProcessorThree-level Cacheaop
0 likes · 14 min read
How Spring Resolves Circular Dependencies Using Early Exposure and a Three‑Level Cache
Sanyou's Java Diary
Sanyou's Java Diary
May 22, 2022 · Backend Development

How Spring’s Three‑Level Cache Solves Circular Dependencies

This article explains what circular dependencies are in Spring, describes the three‑level cache mechanism (singletonObjects, earlySingletonObjects, singletonFactories), shows how it resolves singleton bean cycles, and outlines scenarios where the cache cannot break the dependency, such as constructor injection and prototype beans.

Three-level Cachebean-lifecyclecircular-dependency
0 likes · 14 min read
How Spring’s Three‑Level Cache Solves Circular Dependencies
Top Architect
Top Architect
Mar 21, 2022 · Backend Development

How Spring Resolves Bean Circular Dependencies with a Three‑Level Cache

This article explains Spring's bean lifecycle, the three‑level cache mechanism (singletonObjects, earlySingletonObjects, singletonFactories) used to break circular dependencies, the role of Aware interfaces and BeanPostProcessor, and why a second‑level cache is essential when AOP proxies are involved.

Three-level Cacheaopbackend-development
0 likes · 9 min read
How Spring Resolves Bean Circular Dependencies with a Three‑Level Cache
macrozheng
macrozheng
Mar 18, 2022 · Backend Development

How Spring Solves Circular Dependencies: Deep Dive into Three-Level Caches

This article explains why Spring’s circular dependency problem only occurs with singleton beans, how constructor versus setter injection affects resolution, and why Spring uses a three‑level cache (singletonObjects, earlySingletonObjects, singletonFactories) to expose incomplete beans and support proxy creation without breaking the bean lifecycle.

SingletonThree-level Cachespring
0 likes · 12 min read
How Spring Solves Circular Dependencies: Deep Dive into Three-Level Caches
Java Captain
Java Captain
Feb 24, 2022 · Backend Development

How Spring Solves Bean Circular Dependencies Using a Three-Level Cache

This article explains how Spring's bean lifecycle and its three-level caching mechanism—singletonObjects, earlySingletonObjects, and singletonFactories—work together to resolve circular dependencies, especially when AOP proxies are involved, highlighting why a three‑cache approach is necessary.

Three-level Cacheaopbackend-development
0 likes · 9 min read
How Spring Solves Bean Circular Dependencies Using a Three-Level Cache
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.

Three-level CacheTwo Sumcircular-dependency
0 likes · 9 min read
How Spring Solves Circular Dependencies: Inside the Three‑Level Cache
Programmer DD
Programmer DD
Aug 11, 2020 · Backend Development

Mastering Spring’s Circular Dependency: How the Three-Level Cache Solves Bean Loops

This article explains Spring's circular dependency problem, the conditions under which it can be resolved, and how Spring's three‑level cache—combined with AOP proxy handling—enables beans to reference each other without causing creation failures, providing a comprehensive answer for interview scenarios.

Three-level Cacheaopbean-lifecycle
0 likes · 18 min read
Mastering Spring’s Circular Dependency: How the Three-Level Cache Solves Bean Loops
Top Architect
Top Architect
Jul 21, 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, draws an analogy to the classic two‑sum algorithm, and highlights the core principle behind Spring's dependency injection mechanism.

BackendThree-level Cachecircular-dependency
0 likes · 9 min read
How Spring Solves Circular Dependencies and the Underlying Essence
macrozheng
macrozheng
Jul 16, 2020 · Backend Development

Master Spring’s Circular Dependency: How the Three‑Level Cache Resolves It

This article explains what circular dependency means in Spring, the conditions under which it can be resolved, and walks through the three‑level cache mechanism—including simple cases and AOP‑enhanced scenarios—providing code examples, diagrams, and a clear summary for interview preparation.

Three-level Cacheaopbean-lifecycle
0 likes · 19 min read
Master Spring’s Circular Dependency: How the Three‑Level Cache Resolves It
macrozheng
macrozheng
May 9, 2020 · Backend Development

How Does Spring Resolve Circular Dependencies? Inside the Three‑Level Cache

This article explains how Spring handles circular dependencies in singleton beans by using a three‑level cache, contrasts it with prototype beans that cannot participate, and demonstrates a minimal implementation that mimics Spring's approach, linking the concept to the classic two‑sum algorithm.

Three-level Cachebackend-developmentcircular-dependency
0 likes · 10 min read
How Does Spring Resolve Circular Dependencies? Inside the Three‑Level Cache