Difference between IOC and DI in Spring?

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

Date:30/07/12 05:42:00,        By :Srini


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.

Date :30/07/12 05:43:06,        By :Govanrdan

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

Date :28/08/15 04:29:33,        By :jammulaiah

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

Date :24/07/15 12:51:31,        By :Anand B

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

Date :20/04/16 01:02:39,        By :Narendra

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.

Date :20/02/13 02:13:56,        By :Aditya

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

Date :19/02/16 07:20:38,        By :Paulinha

good short description

Date :17/04/13 11:39:09,        By :Anil Jee Ojha

Simple and easy to understand

Date :17/02/15 11:15:30,        By :Mohan M

Very nice Answer! Short but sweet

Date :15/07/15 08:35:46,        By :Prashant Kamble

Awesome...very clear ..

Date :14/04/16 12:16:51,        By :Mahima

Very Nice, accurate answer.

Date :13/05/15 09:30:11,        By :Murali

Thanks for keeping it very short yet clear.

Date :12/09/15 08:36:32,        By :junaid

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


Date :12/05/14 09:12:15,        By :Soha s

sweet and short description

Date :12/03/15 06:12:43,        By :Pravin


Date :11/05/15 15:10:43,        By :SUSHIL

Post Answer

  Captcha code
Enter Above Code: