What is spring ? What is spring framework, how it is used, and what are the benefits ?
Spring is an open source, lightweight application framework and Inversion of control container for developing enterprise Java applications.
Spring Framework works on two principles,
1. DI Dependency Injections
2. AOP Aspect Oriented Programming
Features of Spring Framework:
Lightweight Framework: spring is lightweight because of its size and transparency. Also, it works on POJO (plain old Java objects).
Inversion of Control (IOC): A Major feature of spring is its loose coupling, which is achieved using IOC.
Aspect Oriented Programming: Separation of business logic from services is what is achieved using AOP.
Spring MVC : Spring MVC Model View Controller is a web app framework used to develop Web Applications.
Transaction Management: Spring provides support for transactions using a generic abstraction layer.
JDBC Error and Exception Handling: Spring provides a layer of exception handling released to JDBC which helps in handling all exceptions.
Spring Framework Architecture:

Core Container:
Core container consists of 4 modules:
1. Spring Core Module: It provides implementation for IoC (Inversion of Control) and DI (Dependency Injection)
2. Spring Bean: It provides the bean factory for the implementation of Beans and its management.
3. Spring Context: Spring context is the combination of core and beans to create a context on which we can access any object.
4. Spring Expression Language (SpEL): It’s an expression language used on JSP’s through which we can access/manipulate objects.
Spring Web:
Web layer has the following modules:
1. Web: This module helps in initializing the IoC container and has web features like servlet listeners and application context for web.
2. Servlet: It’s the web servlet which contains MVC implementation. It provides all features of MVC like forms, data validations and bindings.
3. Web Socket: Provides implementations for two-way communications and support for web socket.
4. Portlet: Provides support for spring MVS portlet module.
Spring Data Access/Integration Layer:
1. JDBC: Provides JDBC abstraction, which reduces a lot of boilerplate code and helps in exception handling.
2. ORM: Object Relational Mapping helps in mapping data objects (classes) to Tables (dB tables).
3. OXM: Object XML Mappers used to convert objects into XML and XML into objects.
4. JMS: Java Messaging Service used for producing and consuming messages from various sources.
5. Transaction: Provides support for declarative and programmatic transaction management for classes.
AOP Aspect Oriented Programming:
The whole idea behind AOP is to separate the cross-cutting concerns from business logic such as: Logging, Security, etc, resulting in less code as well as separation.
Test Module:
This Test module help us in testing of spring components using its application context and its caching, which makes it easy to test.
Instrumentation:
Instrumentation module provides class instrumentation support and class loader implementations.
IOC Container:
This container is responsible for creating, initializing, configuring the objects/beans.