Giter Site home page Giter Site logo

tiny-spring's Introduction

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框架:高仿版

tiny-spring's People

Contributors

code4craft avatar dugu9sword avatar yusijia avatar bitdeli-chef avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.