Spring Framework-Lecture 4
Spring Framework-Lecture 4
LECTURE - 4
Today’s Agenda
There’s nothing wrong with we ourself creating the object, but wouldn’t it be nice to manage the
dependencies in a better way?
Managing such a large number of objects will be extremely difficult. This is where Spring comes to
the rescue.
Instead of constructing dependencies by itself, an object can retrieve its dependencies from Spring .
But before discussing about IOC Container lets recall what is IOC ?
What Is IOC ?
IOC stands for Inversion Of Control.
But before learning Spring you will require resources like books , notes,
videos, assignments and most importantly doubt solving.
Now if you have to arrange these resources yourself then it will be very
difficult for you to focus on your core task i.e. learning Spring.
Example 1
But suppose you join Spring Course at an institute .
And you are asked just to learn Spring , then it will be very easy.
Example 2
Suppose you are a painter artist .
Now if you have to arrange these tools yourself then it will be very difficult
for you to focus on your core job i.e. painting.
But if someone arranges these tools for you and you are asked just
to do the painting then it will be very easy.
What Is IOC ?
That SOMEONE is the FRAMEWORK and this principle is called as
INVERSION OF CONTROL.
ASP.Net
RoR
Angular
Laravel
Google Guice
The Spring IOC
Container
The Spring IoC container or Spring Container is the "Heart" or
"Core Component" of the Spring Framework.
It is same like :-
Dependency Injection
They help the container to define and manage various aspects of an application.
Bean definitions
Dependency Injection
Bean Lifecycle
Bean Autowiring
Bean Post Processing
Database Configurations
Security Confgurations
AOP Configurations
Ways Of Providing Configurations
Configurations can be provided to Spring by :
XML
Java
Annotation
Properties file
Environment Variables
Command line arguments