Dependency Injection (DI) is at the heart of Spring. It refers to plugging in references at runtime between many different objects, either through a constructor, setter, or even directly to a field using runtime reflection. This enables IOC (Inversion of Control) where one class can use an instance of another class without knowing any details about how that object was constructed or its exact implementation class.
Spring’s design allows the use of POJOs (Plain Old Java Objects). In other words, you don’t need to implement a specific interface or extend a class in order to use Spring’s DI. ...