SPRING = Plain JAVA( CORE JAVA) + DI + AOP
How does a POJO achieve the complex functionality of EJB ?
We have a Spring container - That helps to create a Bean, give it DI and AOP.
Spring container is the GOD of BEANS(POJO)- It maintains the life of BEAN
TWO type of Container:
1) BEAN FACTORY
2) APPLICATION CONTEXT
BEAN FACTORY: See the below image:

1)We need a file resource to read the XML file that contain all Bean definitions.
2) BeanFactory will not create an object of Beans until we call getBean method on BeanFactory object.
3) BeanFactory used Factory framework to create and dispense Beans.
Application context is the most commonly used Spring container. It can read the XML file, which contain bean definitions, from File system, class path, or Web application.