Spring Core

Spring framework is an open source Java platform, It is the most popular application development framework for enterprise Java.

Dependency Injection (DI) :

Dependency Injection (DI) flavor of Inversion of Control. The Inversion of Control (IoC) is helps in gluing these classes together and at the same time keeping them independent. In this way application classes should be as independent as possible of other Java classes to increase the possibility to reuse these classes.


Aspect Oriented Programming (AOP) :

Aspect-Oriented Programming entails breaking down program logic into distinct parts called so-called concerns.

The Spring container is at the core of the Spring Framework. It create object and wired them together, configure and manage life cycle of spring.Spring provides the following two distinct types of containers.

BeanFactory:

This is the simplest container providing the basic support for DI and is defined by the org.springframework.beans.factory.BeanFactory interface. The BeanFactory and related interfaces, such as BeanFactoryAware, InitializingBean, DisposableBean, are still present in Spring for the purpose of backward compatibility with a large number of third-party frameworks that integrate with Spring.


ApplicationContext:

This container adds more enterprise-specific functionality such as the ability to resolve textual messages from a properties file and the ability to publish application events to interested event listeners. This container is defined by the org.springframework.context.ApplicationContext interface.

ApplicationContext Vs BeanFactory :

ApplicationContext.                                BeanFactory
    

1) More than one config files possible              Only one config file or.xml file
2) Application contexts can publish                  Doesn’t support.    
events to beans that are
registered as listeners    
3) Support internationalization                         It’s not
(I18N) messages    
4) Support application lifecycle                         Doesn’t support.
events, and validation.    
5) Support  many enterprise services                Doesn’t support.    
such JNDI access, EJB integration,
remoting. 


The ApplicationContext is the parent of  BeanFactory and provides the functionality such as
   -Message resource handling
   -Event propagation
   - Declarative mechanisms to create the ApplicationContext
   - Application-layer specific contexts such as the WebApplicationContext

1 2 3 4