SlideShare a Scribd company logo
Introduction to
Spring
framework
SpringMehul
Jariwala
1
• Framework.
• Spring History.
• Key Features of Spring
Framework.
• Spring Architecture.
• Spring Files.
• Steps For Creating Spring Projects.
Overvie
w
2
Framework
 Frameworks are large prewritten code to which
you add your own code to solve a problem in a
specific domain.
 You make use of a framework by calling its
methods,inheritance,and supplying “call-backs”
listeners.
 Example Java’s Swing and AWT classes.They
have a huge amount of code to manage the
user interface and there is inversion of control.
3
Framework
• Software frameworks may include support
programs, compilers , code libraries , tool sets ,
API , Function, Producer , Datafile.
4
Spring
 Spring is the most popular application
development framework for enterprise Java™.
 Millions of developers use Spring to create
high performing, easily testable, reusable code
without any lock-in.
 Open source Java platform since 2003.
 Reduces code and speeds up development.
 Current Version is 4.0 5
Spring layer
Presentation layer – An MVC framework that is most
similar to Struts but is more powerful and easy to use.
Business layer – Lightweight IOC container and AOP
support (including built in aspects)
Persistence layer – DAO template support for popular
ORMs and JDBC
6
Spring layer
Presentation Logic Layer
Business Logic Layer
Data Access Layer
PHP,JSP,HTML
Data Base
App Logic
Data StorageBrowser View
Procedures
7
Spring History
8
Goals
 Make J2EE easier to use
 Make the common tasks easier
 Promote good programming practice.
 You can focus on the domain problems.
9
 Lightweight: Spring Framework is lightweight
with respect to size and transparency.
 Container: Spring Framework creates and
manages the life cycle and configuration of
application objects.
 Spring supports All types of application
development: We can develop any type of
applications using spring, e.g. Core java, web
Application, Distributed application, Enterprise
application.
Spring Features
10
Spring Architecture
 The Spring framework is a layered architecture
which consists of several modules.
 All modules are built on the top of its core
container.
 It's modular architecture enables integration
with other frameworks without much difficulties
11
Spring Architecture
12
Spring Architecture
The Core Module: This module contains
the Bean Factory, an implementation of Factory
Pattern which creates the bean as per the
configurations provided by the developer in an
XML file.
Core Module
The IOC Container.
13
Spring Architecture
 The AOP Module: AOP is a useful technique
that enables adding executable blocks to the
source code without explicitly changing it.
 AOP to avoid re-implementation of some
common behaviour in multiple classes.
AOP
Spring AOP
AspectJ integration
14
Spring Architecture
 The DAO Module:- (Data Access Object)
standardizes the data access work using
JDBC, Hibernate or JDO.
 This provides an abstraction layer to the low
level task of creating a connection, releasing it
etc.
DAO
Spring JDBC
Transaction
Management
15
Spring Architecture
 The ORM Module:- Spring doesn’t provides its
own ORM implementation but offers
integrations with popular Object Relational
mapping tools like Hibernate, iBATIS SQL
Maps, Oracle TopLink and JPA etc.
ORM
Hibernate
JPA,JDO,OJB
16
Spring Architecture
 The JEE Module:- It also provides support for
JMX, JCA, EJB and JMS etc.
 JCA (Java EE Connection API).
 EJB (Enterprise JavaBeans).
 JMS (Java Message Service).
JEE
EJB
JMS
17
Spring Architecture
 The Web Module:- Spring comes with MVC
framework which eases the task of developing
web applications.
 It also integrates well with the most popular
MVC frameworks like Struts, Tapestry, JSF,
Wicket etc.
18
New about Spring
19
Spring Project File
 Application Context.xml
The Application Context is Spring's advanced
container. Similar to Bean Factory, it can load
bean definitions.
This container is defined
by org.springframework.context.ApplicationCont
e xtinterface.
20
Spring Project File
 The most commonly used Application
Context implementations.
1. FileSystemXmlApplicationContext − Here you need
to provide the full path of the XML bean configuration
file.
2. ClassPathXmlApplicationContext − Here you do not
need To provide the full path of the XML file but you
need to set CLASSPATH.
3. WebXmlApplicationContext − This container loads
the XML file with definitions of all beans from within a21
Spring Project File
 Dispatcher-servlet.xml
The Spring Web model-view-controller (MVC)
framework is designed around a Dispatcher
Servlet that handles all the HTTP requests and
responses.
22
Spring Project File
 Web.xml
The /WEB-INF/web.xml file is used to define
how to deploy the web module to a Servlet
container like JBoss, Tomcat, Glassfish or any
other servlet container.
Basically web.xml tell container all servlets in
the web application with <servlet> element , then
tell container when to use which servlet by the url
mapping with <servlet-mapping> element.
23
Steps For Creating Project
 Step 1:- Creating Projects and Select Java
Web Application.
24
Steps For Creating Project
 Step 2:- Write a Name of Java Application
Projects And Click Finish.
25
Steps For Creating Project
 Step 3:- Select Spring Web MVC
Frameworks.
26
Steps For Creating Project
 Step 4:- Structure Of Spring MVC.
27
Reference
 https://www.roseindia.net/spring/architecture-of-
spring.shtml
 http://www.java4s.com/spring-mvc/spring-mvc-
execution-flow-diagram-spring-mvc-3-2-flow/
 https://dzone.com/articles/spring-framework-architecture
 https://www.javacodegeeks.com/2013/02/introduction-to-
javaee-concepts.html
 https://www.javatpoint.com/example-of-spring-
application-in-eclipse
 https://www.tutorialspoint.com/spring/spring_web_mvc_f
ramework.htm
 https://stackoverflow.com/questions/4545968/loading-
application-context-xml 28
Thanks You.
29

More Related Content

PPTX
Introduction to Spring Framework
Serhat Can
 
PDF
Introduction to Spring Framework
Hùng Nguyễn Huy
 
PPTX
Spring Framework
tola99
 
PPTX
Introduction to spring boot
Santosh Kumar Kar
 
PPTX
Angular overview
Thanvilahari
 
PPTX
Spring boot
Gyanendra Yadav
 
PPSX
Data Types & Variables in JAVA
Ankita Totala
 
PPTX
Reactjs
Neha Sharma
 
Introduction to Spring Framework
Serhat Can
 
Introduction to Spring Framework
Hùng Nguyễn Huy
 
Spring Framework
tola99
 
Introduction to spring boot
Santosh Kumar Kar
 
Angular overview
Thanvilahari
 
Spring boot
Gyanendra Yadav
 
Data Types & Variables in JAVA
Ankita Totala
 
Reactjs
Neha Sharma
 

What's hot (20)

PDF
Spring Boot
HongSeong Jeon
 
PPT
Spring ppt
Mumbai Academisc
 
PDF
Spring MVC Framework
Hùng Nguyễn Huy
 
PPTX
Spring boot - an introduction
Jonathan Holloway
 
PDF
Spring Boot
Jaydeep Kale
 
PPTX
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
shamnasain
 
PDF
Spring Boot
Pei-Tang Huang
 
PDF
Spring annotation
Rajiv Srivastava
 
PPSX
JDBC: java DataBase connectivity
Tanmoy Barman
 
PPTX
Introduction to Spring Boot
Purbarun Chakrabarti
 
PDF
Spring Framework - Core
Dzmitry Naskou
 
PDF
Introduction to Spring Boot!
Jakub Kubrynski
 
PPTX
Constructor in java
Madishetty Prathibha
 
PDF
Spring boot introduction
Rasheed Waraich
 
PPT
Java collections concept
kumar gaurav
 
PPTX
Spring Security 5
Jesus Perez Franco
 
PPT
Java database connectivity
Vaishali Modi
 
PPS
Wrapper class
kamal kotecha
 
PPT
Java: GUI
Tareq Hasan
 
PPTX
Java 8 presentation
Van Huong
 
Spring Boot
HongSeong Jeon
 
Spring ppt
Mumbai Academisc
 
Spring MVC Framework
Hùng Nguyễn Huy
 
Spring boot - an introduction
Jonathan Holloway
 
Spring Boot
Jaydeep Kale
 
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
shamnasain
 
Spring Boot
Pei-Tang Huang
 
Spring annotation
Rajiv Srivastava
 
JDBC: java DataBase connectivity
Tanmoy Barman
 
Introduction to Spring Boot
Purbarun Chakrabarti
 
Spring Framework - Core
Dzmitry Naskou
 
Introduction to Spring Boot!
Jakub Kubrynski
 
Constructor in java
Madishetty Prathibha
 
Spring boot introduction
Rasheed Waraich
 
Java collections concept
kumar gaurav
 
Spring Security 5
Jesus Perez Franco
 
Java database connectivity
Vaishali Modi
 
Wrapper class
kamal kotecha
 
Java: GUI
Tareq Hasan
 
Java 8 presentation
Van Huong
 
Ad

Similar to Java Spring Framework (20)

PPTX
Spring framework-tutorial
vinayiqbusiness
 
PPTX
Java spring ppt
natashasweety7
 
ODT
Spring framework
Shivi Kashyap
 
DOCX
Spring notes
Rajeev Uppala
 
PPTX
Spring Architecture | Advanced Java
VISHAL DONGA
 
PPTX
Introduction to Spring Framework
Dineesha Suraweera
 
PPTX
Spring (1)
Aneega
 
PPTX
Introduction to Spring Framework
ASG
 
PDF
Spring Framework Tutorial | VirtualNuggets
Virtual Nuggets
 
PPT
Screenshot from 2024-05-28 16-46-45 (30 files merged).ppt
imjdabhinawpandey
 
PPTX
Spring Basics
Emprovise
 
PPTX
How Spring Framework Really Works?
NexSoftsys
 
PPTX
Introduction to j2 ee frameworks
Mukesh Kumar
 
PPTX
Introduction Java Web Framework and Web Server.
suranisaunak
 
ODP
Spring User Guide
Muthuselvam RS
 
PDF
Framework adoption for java enterprise application development
Clarence Ho
 
PDF
Spring Framework -I
People Strategists
 
PDF
Spring 2
Aruvi Thottlan
 
PPTX
Spring framework Introduction
Anuj Singh Rajput
 
PPT
Spring - a framework written by developers
MarcioSoaresPereira1
 
Spring framework-tutorial
vinayiqbusiness
 
Java spring ppt
natashasweety7
 
Spring framework
Shivi Kashyap
 
Spring notes
Rajeev Uppala
 
Spring Architecture | Advanced Java
VISHAL DONGA
 
Introduction to Spring Framework
Dineesha Suraweera
 
Spring (1)
Aneega
 
Introduction to Spring Framework
ASG
 
Spring Framework Tutorial | VirtualNuggets
Virtual Nuggets
 
Screenshot from 2024-05-28 16-46-45 (30 files merged).ppt
imjdabhinawpandey
 
Spring Basics
Emprovise
 
How Spring Framework Really Works?
NexSoftsys
 
Introduction to j2 ee frameworks
Mukesh Kumar
 
Introduction Java Web Framework and Web Server.
suranisaunak
 
Spring User Guide
Muthuselvam RS
 
Framework adoption for java enterprise application development
Clarence Ho
 
Spring Framework -I
People Strategists
 
Spring 2
Aruvi Thottlan
 
Spring framework Introduction
Anuj Singh Rajput
 
Spring - a framework written by developers
MarcioSoaresPereira1
 
Ad

Recently uploaded (20)

PDF
Types of Literary Text: Poetry and Prose
kaelandreabibit
 
PDF
Landforms and landscapes data surprise preview
jpinnuck
 
PPTX
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
PDF
PG-BPSDMP 2 TAHUN 2025PG-BPSDMP 2 TAHUN 2025.pdf
AshifaRamadhani
 
PPTX
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
PDF
Wings of Fire Book by Dr. A.P.J Abdul Kalam Full PDF
hetalvaishnav93
 
PPTX
Odoo 18 Sales_ Managing Quotation Validity
Celine George
 
PPTX
Congenital Hypothyroidism pptx
AneetaSharma15
 
PPTX
Software Engineering BSC DS UNIT 1 .pptx
Dr. Pallawi Bulakh
 
DOCX
Action Plan_ARAL PROGRAM_ STAND ALONE SHS.docx
Levenmartlacuna1
 
PPTX
NOI Hackathon - Summer Edition - GreenThumber.pptx
MartinaBurlando1
 
PPTX
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
PDF
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
PPTX
Strengthening open access through collaboration: building connections with OP...
Jisc
 
DOCX
UPPER GASTRO INTESTINAL DISORDER.docx
BANDITA PATRA
 
PPTX
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
PDF
3.The-Rise-of-the-Marathas.pdfppt/pdf/8th class social science Exploring Soci...
Sandeep Swamy
 
PPTX
Skill Development Program For Physiotherapy Students by SRY.pptx
Prof.Dr.Y.SHANTHOSHRAJA MPT Orthopedic., MSc Microbiology
 
PPTX
Understanding operators in c language.pptx
auteharshil95
 
PPTX
IMMUNIZATION PROGRAMME pptx
AneetaSharma15
 
Types of Literary Text: Poetry and Prose
kaelandreabibit
 
Landforms and landscapes data surprise preview
jpinnuck
 
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
PG-BPSDMP 2 TAHUN 2025PG-BPSDMP 2 TAHUN 2025.pdf
AshifaRamadhani
 
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
Wings of Fire Book by Dr. A.P.J Abdul Kalam Full PDF
hetalvaishnav93
 
Odoo 18 Sales_ Managing Quotation Validity
Celine George
 
Congenital Hypothyroidism pptx
AneetaSharma15
 
Software Engineering BSC DS UNIT 1 .pptx
Dr. Pallawi Bulakh
 
Action Plan_ARAL PROGRAM_ STAND ALONE SHS.docx
Levenmartlacuna1
 
NOI Hackathon - Summer Edition - GreenThumber.pptx
MartinaBurlando1
 
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
Strengthening open access through collaboration: building connections with OP...
Jisc
 
UPPER GASTRO INTESTINAL DISORDER.docx
BANDITA PATRA
 
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
3.The-Rise-of-the-Marathas.pdfppt/pdf/8th class social science Exploring Soci...
Sandeep Swamy
 
Skill Development Program For Physiotherapy Students by SRY.pptx
Prof.Dr.Y.SHANTHOSHRAJA MPT Orthopedic., MSc Microbiology
 
Understanding operators in c language.pptx
auteharshil95
 
IMMUNIZATION PROGRAMME pptx
AneetaSharma15
 

Java Spring Framework

  • 2. • Framework. • Spring History. • Key Features of Spring Framework. • Spring Architecture. • Spring Files. • Steps For Creating Spring Projects. Overvie w 2
  • 3. Framework  Frameworks are large prewritten code to which you add your own code to solve a problem in a specific domain.  You make use of a framework by calling its methods,inheritance,and supplying “call-backs” listeners.  Example Java’s Swing and AWT classes.They have a huge amount of code to manage the user interface and there is inversion of control. 3
  • 4. Framework • Software frameworks may include support programs, compilers , code libraries , tool sets , API , Function, Producer , Datafile. 4
  • 5. Spring  Spring is the most popular application development framework for enterprise Java™.  Millions of developers use Spring to create high performing, easily testable, reusable code without any lock-in.  Open source Java platform since 2003.  Reduces code and speeds up development.  Current Version is 4.0 5
  • 6. Spring layer Presentation layer – An MVC framework that is most similar to Struts but is more powerful and easy to use. Business layer – Lightweight IOC container and AOP support (including built in aspects) Persistence layer – DAO template support for popular ORMs and JDBC 6
  • 7. Spring layer Presentation Logic Layer Business Logic Layer Data Access Layer PHP,JSP,HTML Data Base App Logic Data StorageBrowser View Procedures 7
  • 9. Goals  Make J2EE easier to use  Make the common tasks easier  Promote good programming practice.  You can focus on the domain problems. 9
  • 10.  Lightweight: Spring Framework is lightweight with respect to size and transparency.  Container: Spring Framework creates and manages the life cycle and configuration of application objects.  Spring supports All types of application development: We can develop any type of applications using spring, e.g. Core java, web Application, Distributed application, Enterprise application. Spring Features 10
  • 11. Spring Architecture  The Spring framework is a layered architecture which consists of several modules.  All modules are built on the top of its core container.  It's modular architecture enables integration with other frameworks without much difficulties 11
  • 13. Spring Architecture The Core Module: This module contains the Bean Factory, an implementation of Factory Pattern which creates the bean as per the configurations provided by the developer in an XML file. Core Module The IOC Container. 13
  • 14. Spring Architecture  The AOP Module: AOP is a useful technique that enables adding executable blocks to the source code without explicitly changing it.  AOP to avoid re-implementation of some common behaviour in multiple classes. AOP Spring AOP AspectJ integration 14
  • 15. Spring Architecture  The DAO Module:- (Data Access Object) standardizes the data access work using JDBC, Hibernate or JDO.  This provides an abstraction layer to the low level task of creating a connection, releasing it etc. DAO Spring JDBC Transaction Management 15
  • 16. Spring Architecture  The ORM Module:- Spring doesn’t provides its own ORM implementation but offers integrations with popular Object Relational mapping tools like Hibernate, iBATIS SQL Maps, Oracle TopLink and JPA etc. ORM Hibernate JPA,JDO,OJB 16
  • 17. Spring Architecture  The JEE Module:- It also provides support for JMX, JCA, EJB and JMS etc.  JCA (Java EE Connection API).  EJB (Enterprise JavaBeans).  JMS (Java Message Service). JEE EJB JMS 17
  • 18. Spring Architecture  The Web Module:- Spring comes with MVC framework which eases the task of developing web applications.  It also integrates well with the most popular MVC frameworks like Struts, Tapestry, JSF, Wicket etc. 18
  • 20. Spring Project File  Application Context.xml The Application Context is Spring's advanced container. Similar to Bean Factory, it can load bean definitions. This container is defined by org.springframework.context.ApplicationCont e xtinterface. 20
  • 21. Spring Project File  The most commonly used Application Context implementations. 1. FileSystemXmlApplicationContext − Here you need to provide the full path of the XML bean configuration file. 2. ClassPathXmlApplicationContext − Here you do not need To provide the full path of the XML file but you need to set CLASSPATH. 3. WebXmlApplicationContext − This container loads the XML file with definitions of all beans from within a21
  • 22. Spring Project File  Dispatcher-servlet.xml The Spring Web model-view-controller (MVC) framework is designed around a Dispatcher Servlet that handles all the HTTP requests and responses. 22
  • 23. Spring Project File  Web.xml The /WEB-INF/web.xml file is used to define how to deploy the web module to a Servlet container like JBoss, Tomcat, Glassfish or any other servlet container. Basically web.xml tell container all servlets in the web application with <servlet> element , then tell container when to use which servlet by the url mapping with <servlet-mapping> element. 23
  • 24. Steps For Creating Project  Step 1:- Creating Projects and Select Java Web Application. 24
  • 25. Steps For Creating Project  Step 2:- Write a Name of Java Application Projects And Click Finish. 25
  • 26. Steps For Creating Project  Step 3:- Select Spring Web MVC Frameworks. 26
  • 27. Steps For Creating Project  Step 4:- Structure Of Spring MVC. 27
  • 28. Reference  https://www.roseindia.net/spring/architecture-of- spring.shtml  http://www.java4s.com/spring-mvc/spring-mvc- execution-flow-diagram-spring-mvc-3-2-flow/  https://dzone.com/articles/spring-framework-architecture  https://www.javacodegeeks.com/2013/02/introduction-to- javaee-concepts.html  https://www.javatpoint.com/example-of-spring- application-in-eclipse  https://www.tutorialspoint.com/spring/spring_web_mvc_f ramework.htm  https://stackoverflow.com/questions/4545968/loading- application-context-xml 28