Tagged articles

ObjectFactory

3 articles · Page 1 of 1
Programmer XiaoFu
Programmer XiaoFu
May 29, 2026 · Backend Development

Why Does Spring Use a Third-Level Cache When the Second-Level Cache Can Resolve Circular Dependencies?

Spring’s bean factory uses a three‑level cache—singletonObjects, earlySingletonObjects, and singletonFactories—to handle circular dependencies, but only the third level is needed when AOP proxies are involved, allowing lazy proxy creation without breaking the standard bean lifecycle.

AOPBean LifecycleCircular Dependency
0 likes · 9 min read
Why Does Spring Use a Third-Level Cache When the Second-Level Cache Can Resolve Circular Dependencies?
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Nov 29, 2021 · Backend Development

Master Spring’s ObjectFactory & FactoryBean: Real-World Usage

This article explains the differences between Spring’s ObjectFactory and FactoryBean interfaces, demonstrates how they are used internally for bean creation, dependency injection, and servlet API injection, and shows how to customize ObjectFactory behavior to resolve bean conflicts and inject specific implementations.

FactoryBeanJavaObjectFactory
0 likes · 9 min read
Master Spring’s ObjectFactory & FactoryBean: Real-World Usage