SlideShare a Scribd company logo
Spring Francesco Ierna
Spring Overview Container  is at the core of the Spring Framework. Spring’s container uses dependency injection (DI) to manage the components that make up an application. This includes creating associations between collaborating components. As such, these objects are cleaner and easier to understand, support reuse, and are easy to unit test. There’s no single Spring container :  Bean factories   (defined by the  org.springframework.beans.factory.BeanFactory  interface) are the simplest of containers, providing basic support for DI
Application contexts  (defined by the  org.springframework.context.ApplicationContext  interface) build on the notion of a bean factory by providing application framework services, such as the ability to resolve textual messages from a properties file and the ability to publish application events to interested event listeners.  ClassPathXmlApplicationContext —Loads a context definition from an XML file located in the classpath, treating context definition files as classpath resources.
FileSystemXmlApplicationContext —Loads a context definition from an XML file in the file system
XmlWebApplicationContext — from an XML file con-tained within a web application. FileSystemXmlApplicationContext(1) vs   ClassPathXmlApplicationContext(2)   (1)   will look for foo.xml in a specific location within the file system, whereas (2)   will look for foo.xml anywhere in the classpath (including JAR files).
Code Application Context Loading an application context from the file system or from the classpath is similar to how you load beans into a bean factory.  For example, here’s how you’d  load a  File -  SystemXmlApplicationContext:  ApplicationContext context = new FileSystemXmlApplicationContext("c:/foo.xml");  Similarly, you can load an application context from  within the application’s classpath using  ClassPathXmlApplicationContext :
ApplicationContext context = new ClassPathXmlApplicationContext("foo.xml");
Spring Framework Modules
Spring Modules Overview Spring Framework  is a container that manages how the beans in a Spring-enabled application are created, configured, and managed. Within this module you’ll find the bean factory, which is the portion of Spring that provides DI
AOP Modules  : Provides rich support for aspect-oriented programming in its AOP module

More Related Content

PPTX
Efficient Spring Data REST Development
Catalin Tudose
 
PPTX
Spring @configuration - So Long Spring XMLs
Avi Etzioni
 
PPT
Session 3 inter-servlet communication & filters - Giáo trình Bách Khoa Aptech
MasterCode.vn
 
PPT
Using OpenCalais in the context of linked data
guest342da08
 
PPT
Now Perform Excel Recovery Mac
ExcelRecoveryMac
 
PDF
Web Programming - 9 Create, Read, Update and Delete
AndiNurkholis1
 
PPTX
Document Summarizer
Aditya Lunawat
 
PPT
Eim Automation For Siebel Crm
jayaramans
 
Efficient Spring Data REST Development
Catalin Tudose
 
Spring @configuration - So Long Spring XMLs
Avi Etzioni
 
Session 3 inter-servlet communication & filters - Giáo trình Bách Khoa Aptech
MasterCode.vn
 
Using OpenCalais in the context of linked data
guest342da08
 
Now Perform Excel Recovery Mac
ExcelRecoveryMac
 
Web Programming - 9 Create, Read, Update and Delete
AndiNurkholis1
 
Document Summarizer
Aditya Lunawat
 
Eim Automation For Siebel Crm
jayaramans
 

Viewers also liked (6)

DOC
Basic Java Handout
Manjunatha RK
 
PPTX
A brief overview of java frameworks
MD Sayem Ahmed
 
PDF
Spring Web Services: SOAP vs. REST
Sam Brannen
 
PDF
Spring Framework - MVC
Dzmitry Naskou
 
PDF
Spring Framework - Core
Dzmitry Naskou
 
PPTX
Java - Collections framework
Riccardo Cardin
 
Basic Java Handout
Manjunatha RK
 
A brief overview of java frameworks
MD Sayem Ahmed
 
Spring Web Services: SOAP vs. REST
Sam Brannen
 
Spring Framework - MVC
Dzmitry Naskou
 
Spring Framework - Core
Dzmitry Naskou
 
Java - Collections framework
Riccardo Cardin
 
Ad

Similar to SPRING 1. overview (20)

PDF
Spring 2
Aruvi Thottlan
 
PPTX
Introduction to Spring sec2.pptx
NourhanTarek23
 
PPTX
spring framework ppt by Rohit malav
Rohit malav
 
PPTX
Java Spring Framework
Mehul Jariwala
 
PPTX
Spring (1)
Aneega
 
PPTX
Introduction to Spring Framework
Dineesha Suraweera
 
PPTX
Spring Basics
ThirupathiReddy Vajjala
 
PPT
Loaders and Linkers
kunj desai
 
ODP
Different Types of Containers in Spring
Sunil kumar Mohanty
 
PPTX
Java spring ppt
natashasweety7
 
ODP
Spring User Guide
Muthuselvam RS
 
PPT
Android application structure
Alexey Ustenko
 
DOCX
What is Dll, Assemblies and GAC...?
Raja Naqash
 
PPTX
Java J2EE Interview Questions Part 2
javatrainingonline
 
PPTX
Java J2EE Interview Question Part 2
Mindsmapped Consulting
 
PPTX
Spring Basics
Emprovise
 
DOCX
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
Ali Shah
 
PPT
Adobe Flex4
Rich Helton
 
PDF
Implementation and Evaluation of a Component-Based framework for Internet App...
ITIIIndustries
 
PPS
dot NET Framework
Roy Antony Arnold G
 
Spring 2
Aruvi Thottlan
 
Introduction to Spring sec2.pptx
NourhanTarek23
 
spring framework ppt by Rohit malav
Rohit malav
 
Java Spring Framework
Mehul Jariwala
 
Spring (1)
Aneega
 
Introduction to Spring Framework
Dineesha Suraweera
 
Loaders and Linkers
kunj desai
 
Different Types of Containers in Spring
Sunil kumar Mohanty
 
Java spring ppt
natashasweety7
 
Spring User Guide
Muthuselvam RS
 
Android application structure
Alexey Ustenko
 
What is Dll, Assemblies and GAC...?
Raja Naqash
 
Java J2EE Interview Questions Part 2
javatrainingonline
 
Java J2EE Interview Question Part 2
Mindsmapped Consulting
 
Spring Basics
Emprovise
 
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
Ali Shah
 
Adobe Flex4
Rich Helton
 
Implementation and Evaluation of a Component-Based framework for Internet App...
ITIIIndustries
 
dot NET Framework
Roy Antony Arnold G
 
Ad

More from Francesco Ierna (15)

ODP
2. wiring beans
Francesco Ierna
 
ODP
Design Pattern 5. Singleton Pattern
Francesco Ierna
 
ODP
Design Pattern 4. Factory Pattern
Francesco Ierna
 
ODP
SCBCD 2. differenze stateless stateful
Francesco Ierna
 
ODP
SCDJWS 6. REST JAX-P
Francesco Ierna
 
ODP
SCWCD 2. servlet req - resp (cap3 - cap4)
Francesco Ierna
 
ODP
SCDJWS 5. JAX-WS
Francesco Ierna
 
ODP
SCWCD 1. get post - url (cap1 - cap2 )
Francesco Ierna
 
ODP
Design Pattern - 3. Decorator pattern
Francesco Ierna
 
ODP
Design Pattern - 2. Observer
Francesco Ierna
 
ODP
SCDJWS 4. UDDI
Francesco Ierna
 
ODP
SCBCD 1. generic ejb
Francesco Ierna
 
ODP
SCDJWS 3. WSDL
Francesco Ierna
 
ODP
SCDJWS 2. Soap
Francesco Ierna
 
ODP
SCDJWS 1. xml schema
Francesco Ierna
 
2. wiring beans
Francesco Ierna
 
Design Pattern 5. Singleton Pattern
Francesco Ierna
 
Design Pattern 4. Factory Pattern
Francesco Ierna
 
SCBCD 2. differenze stateless stateful
Francesco Ierna
 
SCDJWS 6. REST JAX-P
Francesco Ierna
 
SCWCD 2. servlet req - resp (cap3 - cap4)
Francesco Ierna
 
SCDJWS 5. JAX-WS
Francesco Ierna
 
SCWCD 1. get post - url (cap1 - cap2 )
Francesco Ierna
 
Design Pattern - 3. Decorator pattern
Francesco Ierna
 
Design Pattern - 2. Observer
Francesco Ierna
 
SCDJWS 4. UDDI
Francesco Ierna
 
SCBCD 1. generic ejb
Francesco Ierna
 
SCDJWS 3. WSDL
Francesco Ierna
 
SCDJWS 2. Soap
Francesco Ierna
 
SCDJWS 1. xml schema
Francesco Ierna
 

Recently uploaded (20)

PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
Software Development Methodologies in 2025
KodekX
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
PDF
Doc9.....................................
SofiaCollazos
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Software Development Methodologies in 2025
KodekX
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
Doc9.....................................
SofiaCollazos
 

SPRING 1. overview

  • 2. Spring Overview Container is at the core of the Spring Framework. Spring’s container uses dependency injection (DI) to manage the components that make up an application. This includes creating associations between collaborating components. As such, these objects are cleaner and easier to understand, support reuse, and are easy to unit test. There’s no single Spring container : Bean factories (defined by the org.springframework.beans.factory.BeanFactory interface) are the simplest of containers, providing basic support for DI
  • 3. Application contexts (defined by the org.springframework.context.ApplicationContext interface) build on the notion of a bean factory by providing application framework services, such as the ability to resolve textual messages from a properties file and the ability to publish application events to interested event listeners. ClassPathXmlApplicationContext —Loads a context definition from an XML file located in the classpath, treating context definition files as classpath resources.
  • 4. FileSystemXmlApplicationContext —Loads a context definition from an XML file in the file system
  • 5. XmlWebApplicationContext — from an XML file con-tained within a web application. FileSystemXmlApplicationContext(1) vs ClassPathXmlApplicationContext(2) (1) will look for foo.xml in a specific location within the file system, whereas (2) will look for foo.xml anywhere in the classpath (including JAR files).
  • 6. Code Application Context Loading an application context from the file system or from the classpath is similar to how you load beans into a bean factory. For example, here’s how you’d load a File - SystemXmlApplicationContext: ApplicationContext context = new FileSystemXmlApplicationContext("c:/foo.xml"); Similarly, you can load an application context from within the application’s classpath using ClassPathXmlApplicationContext :
  • 7. ApplicationContext context = new ClassPathXmlApplicationContext("foo.xml");
  • 9. Spring Modules Overview Spring Framework is a container that manages how the beans in a Spring-enabled application are created, configured, and managed. Within this module you’ll find the bean factory, which is the portion of Spring that provides DI
  • 10. AOP Modules  : Provides rich support for aspect-oriented programming in its AOP module
  • 11. DATA ACCESS AND INTEGRATION : data access objects (DAO) module abstracts away the boilerplate code so that you can keep your database code clean and simple, and prevents problems that result from a failure to close database ressources Spring’s ORM support builds on the DAO sup-port , providing a convenient way to build DAOs for several ORM solutions
  • 12. Java Message Service (JMS) for asynchronous integration with other applications through messaging TESTING  : pring provides a module ded-icated to testing Spring applications
  • 13. DI DEF  : With DI, on the other hand, objects are given their dependencies at creation time by some third party that coordinates each object in the system. Objects aren’t expected to create or obtain their dependencies—dependencies are injected into the objects that need them
  • 15. Class doesn’t create his own quest
  • 16. the dependency can be swapped out with a different implementation without the depending object knowing the difference
  • 17. Code is easy to read.
  • 19. How DI works? The Spring application context is fully responsible for the creation of and wiring of the objects that make up the application. loads the Spring context from one or more XML files located in the application’s classpath as ClassPathXmlApplicationContext -> Note that this class knows nothing about which type of Quest our hero has
  • 20. Bean Life with Spring
  • 21. AOP Overview AOP : makes it possible to modularize these services and then apply them declaratively to the components that they should affect. This results in components that are more cohesive and that focus on their own specific concerns, completely ignorant of any sys-tem services that may be involved. In short, aspects ensure that POJOs remain plain.