Skip to main content

Spring IOC Container

  Spring IOC Container


-> If we develop the project without using spring framework then programmer should perform dependency injection among the classes in the application.

-> If programmer performs dependency injection then classes will become tightly coupled.

-> In a Realtime project we will have 100's of classes then performing Dependency Injection is very very difficult and the code will become cumbersome.

-> To overcome this problem we can use Spring IOC container.

-> If we develop the project using spring framework then Spring IOC will take care of Dependency Injections in our application.

-> IOC is a principle that is responsible for managing and collaborating dependencies among the classes available in the application.

Note: IOC stands for Inversion of Control. DI stands for Dependency Injection.

-> In spring framework IOC will perform DI.


---------------------------------------------------------------------------
Building First Application Using Spring Framework
---------------------------------------------------------------------------
1) Open STS IDE and Create Maven Project
                       2) Add Spring-Context dependency in project pom.xml file







Comments

© 2020 The JavaDS Hub

Designed by Open Themes & Nahuatl.mx.