// the find
fuzhengwei/small-spring
🌱《 Spring 手撸专栏》,本专栏以 Spring 源码学习为目的,通过手写简化版 Spring 框架,了解 Spring 核心原理。在手写的过程中会简化 Spring 源码,摘取整体框架中的核心逻辑,简化代码实现过程,保留核心功能,例如:IOC、AOP、Bean生命周期、上下文、作用域、资源处理等内容实现。
A step-by-step reimplementation of core Spring internals (IOC, AOP, bean lifecycle, ApplicationContext) split into ~15 incremental Maven modules, each pairing a chapter's code with a long-form writeup. Aimed at Java developers who want to understand how Spring works by rebuilding a simplified version of it rather than reading the real source cold.
The step-XX module structure is the actual design win — each chapter is a complete, independently buildable project, so you can diff step-04 against step-05 to see exactly what one feature (e.g. CGLIB instantiation, then property injection) added to the codebase. It covers the parts of Spring people actually get stuck on: JDK vs CGLIB dynamic proxy for AOP, the Aware interfaces, FactoryBean, and bean destruction via a JVM shutdown hook. Package naming (cn.bugstack.springframework.beans.factory.support, etc.) mirrors real Spring packages closely enough that concepts transfer directly when you go read the actual framework.
It's explicitly a derivative of two other projects (mini-spring, tiny-spring) with added commentary rather than original design — if you've seen either of those, this adds Chinese-language explanation but not much new engineering. All deeper explanation lives in WeChat article links, not the repo itself, so half the value is gated behind an account on a platform most non-Chinese-speaking users won't have, and no English version exists. Stopped at chapter 15 (annotation-based property injection) with a last push in mid-2023 — no transaction management, no MVC layer, nothing past basic annotation scanning, so it's a solid intro but doesn't get you to the parts of Spring that cause real production pain. Tests are single-method ApiTest demo classes for manual inspection, not assertions you'd trust as a regression suite.