2. Contents
What is Spring ?
Objective of Spring
History of Spring
Architecture of Spring
Advantages of Spring Framework
Procedure of Spring Programming
3. What is Spring ?
The Spring framework is a Open Source Development Framework for
Enterprise Java Applications.
“The Spring framework provides central transaction control of various
objects.”
4. Objective of Spring
Spring controls instantiation of all the objects and passes a Spring
reference to objects using various DI – Dependency Injection techniques
like getter/setter injection and constructor injection (I.e. IoC - Inversion of
Control).
5. History of Spring
The 1st version was written by Rod Johnson
The framework was 1st released under the Apache 2.0 license in June 2003,
Spring 1.0 was released in March 2004,
Spring 1.2.6 was released in March 2005,
Spring 2.0 was released in October 2006,
Spring 2.5 in November 2007,
Spring 3.0 in December 2009,
Spring 3.1 in December 2011,
Spring 3.2.5 in November 2013.
The current version is Spring Framework 4.0 was released in December 2013.
7. Core Container
The Core Container consists the following Modules :
Core
Beans
Context
SPEL
8. Data Access/Integration
The Data Access/Integration layer consists of the
JDBC(Java Database Connectivity)
ORM(Object Relational Mapping)
OXM(Object XML Mapping)
JMS (Java Message Service)
Transaction
9. Web Layer
The Web layer consists of the
Web,
Web-MVC,
Web-Socket
Web-Portlet
10. Advantages of Spring Framework
Works on POJOs. Hence easier for dependency injection / injection of test data.
Enhances modularity Provides more readable codes.
Provides loose coupling between different modules.
Effective in organizing the middle-tier applications.
Flexible use of Dependency injection. Can be configured by XML based schema
or annotation-based style.
Supports declarative transaction, caching, validation and formatting.
11. Procedure of Spring Programming
Create a Java Project
Add required Libraries
Create Source Files
Create Bean Configuration File
Running the Program
12. Create a Java Project
File New Project and finally select Java Project .
16. Create Bean Configuration File
• create a Bean
Configuration file which is
an XML file and acts as
cement that glues the
beans i.e.. classes together.
• This file needs to be
created under the src
directory as shown