In this tutorial you will learn about Spring Dependency Injection (DI) concept with example. Dependency Injection is a design pattern that allows us to remove dependencies from code so that its easier to maintain and test the code. Lets try to understand why we really need dependency injection. Consider two classes Circle and DrawShape as given below.
Circle obj = new Circle();
In this example DrawShape class is dependent on Circle class because we have used new keyword to create Circle object. In caseRead more