Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

HelloWorld1018/tiny-spring

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tiny-spring

A tiny IoC container refer to Spring.

关于

tiny-spring是为了学习Spring的而开发的,可以认为是一个Spring的精简版。Spring的代码很多,层次复杂,阅读起来费劲。我尝试从使用功能的角度出发,参考Spring的实现,一步一步构建,最终完成一个精简版的Spring。有人把程序员与画家做比较,画家有门基本功叫临摹,tiny-spring可以算是一个程序的临摹版本-从自己的需求出发,进行程序设计,同时对著名项目进行参考。

点此查看对本项目的类文件结构和逻辑的分析。 (by @dugu9sword)

功能

  1. 支持singleton类型的bean,包括初始化、属性注入、以及依赖bean注入。
  2. 可从xml中读取配置。
  3. 可以使用Aspectj的方式进行AOP编写,支持接口和类代理。

使用

tiny-spring是逐步进行构建的,里程碑版本我都使用了git tag来管理。例如,最开始的tag是step-1-container-register-and-get,那么可以使用

git checkout step-1-container-register-and-get

来获得这一版本。版本历史见changelog.md

Bitdeli Badge

下面是推广

如果觉得代码理解有难度的,可以报名@方老司 的视频教程:

60分钟徒手撸出Spring框架:土法造炮篇

60分钟徒手撸出Spring框架:高仿版

About

A tiny IoC container refer to Spring.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.