SlideShare a Scribd company logo
Spring
Framework
Tutorial
Topics Covered
1.What is Spring Framework ?
2. Evolution of Spring Framework
3. Features
4. Architecture of Spring Framework
5. MVC Architecture
6. Advantages and Disadvantages
What is Spring
Framework ?
Spring is a lightweight framework. It is an open-source Java Platform which is
used for developing robust Java applications very rapidly and easily. Its
support is extended to various frameworks such as Struts, Hibernate, EJB, JSF,
etc.
Evolution of Spring Framework?
Spring Framework was initially developed by Rod Johnson in June 2003. It was first
released under the license of Apache 2.0 in the year of 2004. JavaEE application
development is made easier by the Spring Framework. XML namespaces and AspectJ
support are provided in spring 2.o, Spring 2.5 version provides annotation-driven
configuration, Java-based @Configuration model comes under in the version of spring
3.o. With the support for Java 8 and Java EE7 technologies, the latest version of spring
framework 4.o was released. When it comes to size and transparency spring framework is
lightweight and weighs around 2 MB
Features of
Spring Framework ?
• POJO Based
• Modular
• Integration with existing frameworks
• Testability
• Web MVC
• Central Exception Handling
• Lightweight Transaction management
Spring Framework Architecture
The Spring Framework consists of seven modules which are shown in the below
Figure. They are named as Spring Core, Spring AOP, Spring Web MVC, Spring DAO,
Spring ORM, Spring context, and Spring Web Flow. Each module provides different
platforms to develop different enterprise applications such as your Spring Web MVC
module is used for developing MVC-based applications.
Spring framework-tutorial
1. Spring Core Module:
The Spring Core module is the core component of the spring framework, that provides the IoCcontainer .The Spring
container is classified into two types of implementations named as
1.
2.
Bean factory
Application context.
Bean Factory interface acts as a container for beans. It also configures and assem bles the dependencies between these objects. The
most common implementation of the Bean Factory interface is the XML bean factory class. That allows you to express the object to
compose your application and remove the interdependencies between application objects.
2. Spring AOP Module:
Spring AOP module and Object-Oriented Programming (OOP), both are similar, in which they split down the applications into a
hierarchy of objects, AOP splits down the programs into aspects. The aspects in Spring AOP, are the regular classes annotated with
@Aspect annotation. These aspects help in transaction management and logging and failure monitoring of an application. For
example, bank operations such as transferring an amount from one account to another transaction management are required.
3. Spring ORM Module:
For accessing the data from databases in an application the Spring ORM module is used. Spring ORM supports DAO, which provides
an easy way to build the DAOs-based ORM solutions that are mentioned below:
• Simple declarative transaction management
• Transparent exception handling
• Thread-safe, lightweight template classes
• DAO support classes
• Resource management
4. Spring Web MVC Module:
The Web MVC module is used for creating Web applications. The Spring Web MVC module separates the code of model and view
components of a Web application. In Spring MVC, when a request is generated from the browser, firstly it goes to the Dispatcher
Servlet class (Front Controller), that dispatches the request to a controller (Simple Form Controller class or Abstract Wizard form
Controller class) using a set of handler mappings. The controller extracts and processes the information embedded in a request and
sends it to the result to the Front controller in the form of the model object.
5. Spring Web Flow Module:
This module is an extension of the Spring Web MVC module. Spring Web MVC framework provides form controllers, such as class
Simple Form Controller and Abstract Wizard Form Controller class, to implement predefined workflow. The Spring Web Flow defines
the XML file that manages the workflow between different pages of a Web application.
6. Spring Web DAO Module:
The DAO package provides DAO support by using data access technologies such as JDBC, Hibernate, or JDO. This module introduces
a JDBC abstraction layer by eliminating the need for providing tedious JDBC coding. It also provides programmatic as well as
declarative transaction management classes. Heterogeneous Java Database Connectivity and O/R mapping help Spring to
work with several data access technologies.
7. Spring Application Context Module:
Application Context is an interface of Bean Factory. It is based on the Core module. It also implements the Message Source interface
and provides the messaging functionality to an application.
MVC Architecture
It is a Java framework that is used to build web applications. It follows the Model-View-Controller
design pattern. All the basic features of a core spring framework are implemented by it.
a. Model
It contains the data of the application. Data can be a single object or a collection of objects.
b. Controller
It contains the business logic of an application. Here, the @Controller annotation is used to
mark the class as the controller.
c. View
A view represents the provided information in a particular format. Generally, JSP+JSTL is used
to create a view page. Although spring also supports other view technologies such as Apache
Velocity, Thyme leaf, and Free Marker.
Advantages Disadvantages
1. Use of POJO
2. Ease of Testability
3. Inversion control and API’s
4. Well designed Web-
Framework
5. No need to be Reinvent
6. No needof Server
1.Complexity of spring
2. High Learning curve
3. Tons of parallel mechanisms
4. Lots of XML in spring
5. Lack of Guidelines.
THANKYOU
Ad

Recommended

Spring ppt
Spring ppt
Mumbai Academisc
 
Java spring framework
Java spring framework
Rajiv Gupta
 
Spring Boot in Action
Spring Boot in Action
Alex Movila
 
Spring Framework
Spring Framework
NexThoughts Technologies
 
Introduction to Spring Boot!
Introduction to Spring Boot!
Jakub Kubrynski
 
Introduction to Spring Framework
Introduction to Spring Framework
Serhat Can
 
Introduction to spring boot
Introduction to spring boot
Santosh Kumar Kar
 
Maven Basics - Explained
Maven Basics - Explained
Smita Prasad
 
Spring introduction
Spring introduction
Manav Prasad
 
VueJS Introduction
VueJS Introduction
David Ličen
 
Spring Framework
Spring Framework
tola99
 
Spring Framework - Core
Spring Framework - Core
Dzmitry Naskou
 
Jsf 110530152515-phpapp01
Jsf 110530152515-phpapp01
Eric Bourdet
 
Spring framework core
Spring framework core
Taemon Piya-Lumyong
 
Spring framework
Spring framework
Sonal Poddar
 
Spring boot - an introduction
Spring boot - an introduction
Jonathan Holloway
 
Introduction to Spring Boot
Introduction to Spring Boot
Purbarun Chakrabarti
 
Spring boot
Spring boot
Gyanendra Yadav
 
Maven ppt
Maven ppt
natashasweety7
 
An introduction to Vue.js
An introduction to Vue.js
Javier Lafora Rey
 
Java Spring Framework
Java Spring Framework
Mehul Jariwala
 
jpa-hibernate-presentation
jpa-hibernate-presentation
John Slick
 
spring-api-rest.pdf
spring-api-rest.pdf
Jaouad Assabbour
 
Node.js Express
Node.js Express
Eyal Vardi
 
Spring Data JPA
Spring Data JPA
Knoldus Inc.
 
An Introduction to Maven
An Introduction to Maven
Vadym Lotar
 
Deep dive into Vue.js
Deep dive into Vue.js
선협 이
 
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Edureka!
 
Spring notes
Spring notes
Rajeev Uppala
 
Spring 2
Spring 2
Aruvi Thottlan
 

More Related Content

What's hot (20)

Spring introduction
Spring introduction
Manav Prasad
 
VueJS Introduction
VueJS Introduction
David Ličen
 
Spring Framework
Spring Framework
tola99
 
Spring Framework - Core
Spring Framework - Core
Dzmitry Naskou
 
Jsf 110530152515-phpapp01
Jsf 110530152515-phpapp01
Eric Bourdet
 
Spring framework core
Spring framework core
Taemon Piya-Lumyong
 
Spring framework
Spring framework
Sonal Poddar
 
Spring boot - an introduction
Spring boot - an introduction
Jonathan Holloway
 
Introduction to Spring Boot
Introduction to Spring Boot
Purbarun Chakrabarti
 
Spring boot
Spring boot
Gyanendra Yadav
 
Maven ppt
Maven ppt
natashasweety7
 
An introduction to Vue.js
An introduction to Vue.js
Javier Lafora Rey
 
Java Spring Framework
Java Spring Framework
Mehul Jariwala
 
jpa-hibernate-presentation
jpa-hibernate-presentation
John Slick
 
spring-api-rest.pdf
spring-api-rest.pdf
Jaouad Assabbour
 
Node.js Express
Node.js Express
Eyal Vardi
 
Spring Data JPA
Spring Data JPA
Knoldus Inc.
 
An Introduction to Maven
An Introduction to Maven
Vadym Lotar
 
Deep dive into Vue.js
Deep dive into Vue.js
선협 이
 
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Edureka!
 
Spring introduction
Spring introduction
Manav Prasad
 
VueJS Introduction
VueJS Introduction
David Ličen
 
Spring Framework
Spring Framework
tola99
 
Spring Framework - Core
Spring Framework - Core
Dzmitry Naskou
 
Jsf 110530152515-phpapp01
Jsf 110530152515-phpapp01
Eric Bourdet
 
Spring boot - an introduction
Spring boot - an introduction
Jonathan Holloway
 
jpa-hibernate-presentation
jpa-hibernate-presentation
John Slick
 
Node.js Express
Node.js Express
Eyal Vardi
 
An Introduction to Maven
An Introduction to Maven
Vadym Lotar
 
Deep dive into Vue.js
Deep dive into Vue.js
선협 이
 
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Edureka!
 

Similar to Spring framework-tutorial (20)

Spring notes
Spring notes
Rajeev Uppala
 
Spring 2
Spring 2
Aruvi Thottlan
 
Spring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggets
Virtual Nuggets
 
Spring framework Introduction
Spring framework Introduction
Anuj Singh Rajput
 
Spring basics for freshers
Spring basics for freshers
Swati Bansal
 
Introduction to Spring Framework
Introduction to Spring Framework
Hùng Nguyễn Huy
 
Spring Framework
Spring Framework
nomykk
 
Spring Framework Rohit
Spring Framework Rohit
Rohit Prabhakar
 
Spring tutorials
Spring tutorials
TIB Academy
 
Spring presentecion isil
Spring presentecion isil
Willy Aguirre
 
Spring presentecion isil
Spring presentecion isil
Willy Aguirre
 
Introduction to Spring Framework
Introduction to Spring Framework
ASG
 
1. Spring intro IoC
1. Spring intro IoC
ASG
 
Struts & spring framework issues
Struts & spring framework issues
Prashant Seth
 
Spring - a framework written by developers
Spring - a framework written by developers
MarcioSoaresPereira1
 
The Complete Spring Tutorial
The Complete Spring Tutorial
cribes
 
Spring core module
Spring core module
Raj Tomar
 
Java spring ppt
Java spring ppt
natashasweety7
 
Spring Framework
Spring Framework
Preetam Palwe
 
Spring mvc
Spring mvc
Pravin Pundge
 
Spring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggets
Virtual Nuggets
 
Spring framework Introduction
Spring framework Introduction
Anuj Singh Rajput
 
Spring basics for freshers
Spring basics for freshers
Swati Bansal
 
Introduction to Spring Framework
Introduction to Spring Framework
Hùng Nguyễn Huy
 
Spring Framework
Spring Framework
nomykk
 
Spring tutorials
Spring tutorials
TIB Academy
 
Spring presentecion isil
Spring presentecion isil
Willy Aguirre
 
Spring presentecion isil
Spring presentecion isil
Willy Aguirre
 
Introduction to Spring Framework
Introduction to Spring Framework
ASG
 
1. Spring intro IoC
1. Spring intro IoC
ASG
 
Struts & spring framework issues
Struts & spring framework issues
Prashant Seth
 
Spring - a framework written by developers
Spring - a framework written by developers
MarcioSoaresPereira1
 
The Complete Spring Tutorial
The Complete Spring Tutorial
cribes
 
Spring core module
Spring core module
Raj Tomar
 
Ad

Recently uploaded (20)

K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
Peer Teaching Observations During School Internship
Peer Teaching Observations During School Internship
AjayaMohanty7
 
VCE Literature Section A Exam Response Guide
VCE Literature Section A Exam Response Guide
jpinnuck
 
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
ErlizaRosete
 
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
parmarjuli1412
 
How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
 
Hurricane Helene Application Documents Checklists
Hurricane Helene Application Documents Checklists
Mebane Rash
 
How to Manage Different Customer Addresses in Odoo 18 Accounting
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
 
Aprendendo Arquitetura Framework Salesforce - Dia 02
Aprendendo Arquitetura Framework Salesforce - Dia 02
Mauricio Alexandre Silva
 
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
 
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
 
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
Ultimatewinner0342
 
A Visual Introduction to the Prophet Jeremiah
A Visual Introduction to the Prophet Jeremiah
Steve Thomason
 
Paper 106 | Ambition and Corruption: A Comparative Analysis of ‘The Great Gat...
Paper 106 | Ambition and Corruption: A Comparative Analysis of ‘The Great Gat...
Rajdeep Bavaliya
 
LDMMIA Yoga S10 Free Workshop Grad Level
LDMMIA Yoga S10 Free Workshop Grad Level
LDM & Mia eStudios
 
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
 
Vitamin and Nutritional Deficiencies.pptx
Vitamin and Nutritional Deficiencies.pptx
Vishal Chanalia
 
List View Components in Odoo 18 - Odoo Slides
List View Components in Odoo 18 - Odoo Slides
Celine George
 
NSUMD_M1 Library Orientation_June 11, 2025.pptx
NSUMD_M1 Library Orientation_June 11, 2025.pptx
Julie Sarpy
 
K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
Peer Teaching Observations During School Internship
Peer Teaching Observations During School Internship
AjayaMohanty7
 
VCE Literature Section A Exam Response Guide
VCE Literature Section A Exam Response Guide
jpinnuck
 
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
ErlizaRosete
 
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
parmarjuli1412
 
How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
 
Hurricane Helene Application Documents Checklists
Hurricane Helene Application Documents Checklists
Mebane Rash
 
How to Manage Different Customer Addresses in Odoo 18 Accounting
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
 
Aprendendo Arquitetura Framework Salesforce - Dia 02
Aprendendo Arquitetura Framework Salesforce - Dia 02
Mauricio Alexandre Silva
 
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
 
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
 
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
Ultimatewinner0342
 
A Visual Introduction to the Prophet Jeremiah
A Visual Introduction to the Prophet Jeremiah
Steve Thomason
 
Paper 106 | Ambition and Corruption: A Comparative Analysis of ‘The Great Gat...
Paper 106 | Ambition and Corruption: A Comparative Analysis of ‘The Great Gat...
Rajdeep Bavaliya
 
LDMMIA Yoga S10 Free Workshop Grad Level
LDMMIA Yoga S10 Free Workshop Grad Level
LDM & Mia eStudios
 
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
 
Vitamin and Nutritional Deficiencies.pptx
Vitamin and Nutritional Deficiencies.pptx
Vishal Chanalia
 
List View Components in Odoo 18 - Odoo Slides
List View Components in Odoo 18 - Odoo Slides
Celine George
 
NSUMD_M1 Library Orientation_June 11, 2025.pptx
NSUMD_M1 Library Orientation_June 11, 2025.pptx
Julie Sarpy
 
Ad

Spring framework-tutorial

  • 2. Topics Covered 1.What is Spring Framework ? 2. Evolution of Spring Framework 3. Features 4. Architecture of Spring Framework 5. MVC Architecture 6. Advantages and Disadvantages
  • 3. What is Spring Framework ? Spring is a lightweight framework. It is an open-source Java Platform which is used for developing robust Java applications very rapidly and easily. Its support is extended to various frameworks such as Struts, Hibernate, EJB, JSF, etc.
  • 4. Evolution of Spring Framework? Spring Framework was initially developed by Rod Johnson in June 2003. It was first released under the license of Apache 2.0 in the year of 2004. JavaEE application development is made easier by the Spring Framework. XML namespaces and AspectJ support are provided in spring 2.o, Spring 2.5 version provides annotation-driven configuration, Java-based @Configuration model comes under in the version of spring 3.o. With the support for Java 8 and Java EE7 technologies, the latest version of spring framework 4.o was released. When it comes to size and transparency spring framework is lightweight and weighs around 2 MB
  • 5. Features of Spring Framework ? • POJO Based • Modular • Integration with existing frameworks • Testability • Web MVC • Central Exception Handling • Lightweight Transaction management
  • 6. Spring Framework Architecture The Spring Framework consists of seven modules which are shown in the below Figure. They are named as Spring Core, Spring AOP, Spring Web MVC, Spring DAO, Spring ORM, Spring context, and Spring Web Flow. Each module provides different platforms to develop different enterprise applications such as your Spring Web MVC module is used for developing MVC-based applications.
  • 8. 1. Spring Core Module: The Spring Core module is the core component of the spring framework, that provides the IoCcontainer .The Spring container is classified into two types of implementations named as 1. 2. Bean factory Application context. Bean Factory interface acts as a container for beans. It also configures and assem bles the dependencies between these objects. The most common implementation of the Bean Factory interface is the XML bean factory class. That allows you to express the object to compose your application and remove the interdependencies between application objects. 2. Spring AOP Module: Spring AOP module and Object-Oriented Programming (OOP), both are similar, in which they split down the applications into a hierarchy of objects, AOP splits down the programs into aspects. The aspects in Spring AOP, are the regular classes annotated with @Aspect annotation. These aspects help in transaction management and logging and failure monitoring of an application. For example, bank operations such as transferring an amount from one account to another transaction management are required. 3. Spring ORM Module: For accessing the data from databases in an application the Spring ORM module is used. Spring ORM supports DAO, which provides an easy way to build the DAOs-based ORM solutions that are mentioned below: • Simple declarative transaction management • Transparent exception handling • Thread-safe, lightweight template classes • DAO support classes • Resource management
  • 9. 4. Spring Web MVC Module: The Web MVC module is used for creating Web applications. The Spring Web MVC module separates the code of model and view components of a Web application. In Spring MVC, when a request is generated from the browser, firstly it goes to the Dispatcher Servlet class (Front Controller), that dispatches the request to a controller (Simple Form Controller class or Abstract Wizard form Controller class) using a set of handler mappings. The controller extracts and processes the information embedded in a request and sends it to the result to the Front controller in the form of the model object. 5. Spring Web Flow Module: This module is an extension of the Spring Web MVC module. Spring Web MVC framework provides form controllers, such as class Simple Form Controller and Abstract Wizard Form Controller class, to implement predefined workflow. The Spring Web Flow defines the XML file that manages the workflow between different pages of a Web application. 6. Spring Web DAO Module: The DAO package provides DAO support by using data access technologies such as JDBC, Hibernate, or JDO. This module introduces a JDBC abstraction layer by eliminating the need for providing tedious JDBC coding. It also provides programmatic as well as declarative transaction management classes. Heterogeneous Java Database Connectivity and O/R mapping help Spring to work with several data access technologies. 7. Spring Application Context Module: Application Context is an interface of Bean Factory. It is based on the Core module. It also implements the Message Source interface and provides the messaging functionality to an application.
  • 10. MVC Architecture It is a Java framework that is used to build web applications. It follows the Model-View-Controller design pattern. All the basic features of a core spring framework are implemented by it.
  • 11. a. Model It contains the data of the application. Data can be a single object or a collection of objects. b. Controller It contains the business logic of an application. Here, the @Controller annotation is used to mark the class as the controller. c. View A view represents the provided information in a particular format. Generally, JSP+JSTL is used to create a view page. Although spring also supports other view technologies such as Apache Velocity, Thyme leaf, and Free Marker.
  • 12. Advantages Disadvantages 1. Use of POJO 2. Ease of Testability 3. Inversion control and API’s 4. Well designed Web- Framework 5. No need to be Reinvent 6. No needof Server 1.Complexity of spring 2. High Learning curve 3. Tons of parallel mechanisms 4. Lots of XML in spring 5. Lack of Guidelines.