How does dependency injection work in Spring?

前端 未结 2 1656
暗喜
暗喜 2020-12-24 14:24

I want to know how spring does dependency injection. I want the low level logic used.

Updates:

I want to know how the object references are injected to the c

2条回答
  •  遥遥无期
    2020-12-24 15:23

    Configuration of dependencies are read from XML, annotations or Java DSL (JavaConfig). Then Spring DI engine wires the dependencies based on the metadata from the configuration using the Java reflection API.

提交回复
热议问题