What is Dependency Injection and Inversion of Control in Spring Framework?

前端 未结 11 2449
你的背包
你的背包 2020-12-02 03:51

\"Dependency Injection\" and \"Inversion of Control\" are often mentioned as the primary advantages of using the Spring framework for developing Web frameworks

Could

11条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-02 04:35

    Spring: Spring is “Inversion of Control” container for the Java Platform.

    Inversion of Control (IoC): Inversion of Control (IoC) is an object-oriented programing practice whereby the object coupling is bounded at runtime by an "assembler" object and are typically not knowable at compile time using static analysis.

    Dependency Injection (DI): "Dependency injection is a software design pattern that allows the removal of hard-coded dependencies and makes it possible to change them, whether at run-time or compile-time." -wiki.

提交回复
热议问题