Spring Overview
Overview
- Spring addressed inconveniences encountered when using EJB as the primary framework.
- Code introduced in Rod Johnson’s 2002 book, “Expert One-on-One J2EE Design and Development,” became the foundation of Spring.
- Developers who read the book felt the code was too valuable to remain only in a book and developed it into a framework with Rod Johnson’s permission.
- The Spring Framework was first released under the Apache 2.0 License in June 2003.
- Version 1.0 was released in March 2004, and version 3.1 was released in December 2011.
Advantages of Spring
- Productivity
- Quality assurance
- Maintainability
Definition of Spring
Although it is commonly called Spring, the precise name is Spring Framework.
- It is an open source application framework for the Java platform.
- It is a lightweight, open source application framework that makes Java enterprise development easier.
- It creates and assembles dependent objects for Java development.
- It connects Java SE objects, or POJOs, without making them dependent on Java EE.
Spring Framework Features
- A lightweight container that directly manages Java objects
- It manages object life cycles, including creation and destruction, and provides required objects.
- A POJO (Plain Old Java Object) framework
- https://en.wikipedia.org/wiki/Plain_old_Java_object
- It makes it easy to support existing libraries.
- Supports IoC (Inversion of Control)
- The framework, rather than the user, owns control and invokes user code when needed.
- Supports DI (Dependency Injection)
- The framework connects layers or services that depend on each other.
- Supports AOP (Aspect-Oriented Programming)
- Common features used across modules, such as transactions, logging, and security, can be separated and managed independently.
- Supports various persistence-related services
- It provides interfaces for integrating mature database libraries such as iBatis and Hibernate.
- Highly extensible
- Existing libraries can often be used with Spring by wrapping them with a simple integration layer. Many libraries already support Spring, and Spring-specific integrations can be separated easily.
Spring Framework Components

- Spring Core
- Provides the IoC, or DI, foundation of the Spring Framework and controls bean classes through
BeanFactory.
- Provides the IoC, or DI, foundation of the Spring Framework and controls bean classes through
- Spring Context
- Builds on Spring Core with additional features for easier development, including adapters for JNDI and EJB.
- Spring DAO
- Supports easier and more consistent JDBC-based DAO development with less code.
- Spring ORM
- Supports integration with object-relational mapping frameworks such as Hibernate, iBatis, and JDO.
- Spring AOP
- Provides Aspect-Oriented Programming support based on the AOP Alliance.
- Spring Web
- Supports web application development features such as
WebApplicationContextand multipart requests, and integrates with frameworks such as Struts and WebWork.
- Supports web application development features such as
- Spring Web MVC
- Provides an independent Model-View-Controller implementation for the web UI layer. It can replace functionality previously handled by Struts and WebWork and provides APIs for UI technologies such as Velocity, Excel, and PDF.