Dependency Injection
- 10th Feb 2014
- 1
- 16148
- dependency injection in spring framework with example why do we need dependency injection in spring why do we need depenedency injection? why do we use dependency injection in spring
Let us understand about Dependency Injection In Spring, Dependency injection(DI) is the design pattern which makes the application components to be loosely coupled by removing the dependency in the program code. Create Door.java which has dependency on SoundAlaram class as below package com.intro; public class Door { private SoundAlarm alarm; […]