Sunday, June 20, 2021

What is dependency injection?

Ans: Dependency means something that is dependent on something .When an object dependent on another object then that object is the dependent object. Ex: if we assume car is an object then tire ,door, machine is the dependent object of car. So, dependency injection means of injecting dependent object from object factory(Spring container) throw constructor/setter/autowiring .

Dependency can be injected throw -

1.Constructor injection

2.Setter injection

3.Autowiring.

No comments:

Post a Comment

Element of a good table (Ref: Database design mere mortals by Michael J. Hernandez)

  Elements of the Ideal Table: It represents a single subject, which can be an object or event that reduces the risk of potential data integ...