what is dependency injection in spring?

Simple.
   You have a class, it has a private field (set to null) and you declare a public setter that provides the value for that field.
   In other words, the dependency of the class (the field) is being injected by an external class (via the setter).
  
That's it. Nothing magical.

Comments