Difference between IOC and DI in Spring?

Difference between IOC (Inversion Of Control) and DI (Dependency Injection) in Spring?.




 

IOC(Inversion Of Controller):   Giving control to the container to get instance of object is called Inversion of Control., means instead of you are creating object using new operator, let the container do that for you.

DI(Dependency Injection):  Way of injecting properties to an object is called Dependency injection.

    We have three types of Dependency injection
        1)  Constructor Injection
        2)  Setter/Getter Injection
        3)  Interface Injection
Spring will support only Constructor Injection and Setter/Getter Injection.

 

Very nice answer thank u

 

Boss ur super... very easy to explain i am reffered so many sites but i am not found this much of easy answer. ur the genius

 

great answer is easly to understand

 

Awesome...... Very clearly understood, Nice.......

 

Awesome answer. I never see this type of clear answer from anybody

 

Hey this is a nice and simplest explanation about these terms. It would be more nice if you also provide some more explanation with a code.

 

I sehcraed a bunch of sites and this was the best.

 

very nice answer

 

good short description

 

Simple and easy to understand

 

Very nice Answer! Short but sweet

 

Awesome...very clear ..

 

Very Nice, accurate answer.

 

Thanks for keeping it very short yet clear.

 

Very good answer..Awesome!

 

More details in youtube now for Difference between IOC and DI in Spring?

https://www.youtube.com/watch?v=FU6AquoQpUw

 

sweet and short description

 

VERY GOOOOOD ANSWER

 

Clear and easy to understood....

 

Thanks, good

 

i was searching for the difference between IOC and DI in many websites..but not clear....after reading your definition my doubt was cleared...very simple and easy to understand ..Thank you so much !!!!!

 

Awesome explanation:):)

 
Post a Reply
Captcha Image