什么是依赖注入? [英] What is Dependency Injection?

查看:128
本文介绍了什么是依赖注入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

什么是依赖注入?

Spring是从概念依赖注入来了。

Spring is the framework from where the concept Dependency Injection came to picture.

DI的目的是什么?它如何受益?如何实现?

What is purpose of DI ? How does it benefit ? How is it implemented ?

推荐答案

开始 here

另请参阅 A-beginners-guide-to-Dependency-Injection

其他地方SO :

  • what-is-dependency-injection
  • dependency-injection-vs-factory-pattern
  • when-to-use-dependency-injection
  • difference-between-dependency-injection-and-inversion-of-control

这篇关于什么是依赖注入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆