SlideShare a Scribd company logo
Spring Boot
1
AGENDA
 Introduction
 Spring Boot vs Spring vs Spring MVC
 Advantages
 Where to start and how does Spring boot work ?
 Dependency Management
 Logging
 Exception Handling
 Database Handling
 Q &A
 Talks and videos
SPRING BOOT
2
Introduction
 Spring Boot provides a good platform for Java developers to develop a
stand-alone and production-grade spring application that you can just run.
You can get started with minimum configurations without the need for an
entire Spring configuration setup.
SPRING BOOT
3
Spring Boot vs Spring vs Spring MVC
 Spring
 Most important feature of Spring Framework is Dependency Injection. At the
core of all Spring Modules is Dependency Injection or IOC Inversion of Control.
 Spring MVC
 Spring MVC Framework provides decoupled way of developing web
applications. With simple concepts like Dispatcher Servlet, ModelAndView and
View Resolver, it makes it easy to develop web applications.
 Spring Boot
 Auto Configuration
 Built around well known patterns
SPRING BOOT
4
Advantages
 It provides a flexible way to configure Java Beans, XML configurations,
and Database Transactions.
 It provides a powerful batch processing and manages REST endpoints.
 In Spring Boot, everything is auto configured; no manual configurations are
needed.
 It offers annotation-based spring application
 Eases dependency management
 It includes Embedded Servlet Container
SPRING BOOT
5
Where to start and how does Spring
boot work ?
 Kindly visit https://start.spring.io/ to start your spring boot application.
 Entry point for spring boot application is the class that contains
@SpringBootApplication annotation and the main method.
 @EnableAutoConfiguration,
@ComponentScan and @SpringBootConfiguration
 @EnableAutoConfiguration autoconfigures dependencies present in
project.
 @ComponentScan scans all the components in the projects.
 Spring Boot Starters are used to manage dependencies.
 Eg: spring-boot-starter-data-jpa, spring-boot-starter-web
6
SPRING BOOT
Dependency Management
 Spring Boot team provides a list of dependencies to support the Spring
Boot version for its every release. You do not need to provide a version for
dependencies in the build configuration file. Spring Boot automatically
configures the dependencies version based on the release. Remember
that when you upgrade the Spring Boot version, dependencies also will
upgrade automatically.
 In Spring Boot, we can use Spring Framework to define our beans and
their dependency injection. The @ComponentScan annotation is used to
find beans and the corresponding injected with @Autowired annotation.
7
SPRING BOOT
Logging
 Spring Boot uses Apache Commons logging for all internal logging.
 Spring Boot’s default configurations provides a support for the use of Java
Util Logging, Log4j2, and Logback.
 By using Spring Boot Starters, Logback will provide a good support for
logging.
8
SPRING BOOT
Exception Handling
 The @ControllerAdvice is an annotation, to handle the exceptions globally.
 The @ExceptionHandler is an annotation used to handle the specific
exceptions and sending the custom responses to the client.
 Sample code snippet:
 @ControllerAdvice public class ProductExceptionController {
@ExceptionHandler(value = ProductNotfoundException.class)
public ResponseEntity<Object> exception(ProductNotfoundException
exception) {
return new ResponseEntity<>("Product not found", HttpStatus.NOT_FOUND);
}
}
9
SPRING BOOT
Database Handling
 Spring Boot provides a very good support to create a DataSource for
Database. We need not write any extra code to create a DataSource in
Spring Boot. Just adding the dependencies and doing the configuration
details is enough to create a DataSource and connect the Database.
10
SPRING BOOT
Q &A
11
SPRING BOOT
Talks and videos
 https://www.tutorialspoint.com/spring_boot/index.htm
 It’s a Kind of Magic: Under the Covers of Spring Boot
 What’s New in Spring Boot 2.0
 Test Driven Development with Spring Boot
 From Zero to Hero with Spring Boot 2.0
Thank You
12
SPRING BOOT

More Related Content

What's hot

Spring boot jpa
Spring boot jpaSpring boot jpa
Spring boot jpa
Hamid Ghorbani
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
Alex Movila
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introduction
Jonathan Holloway
 
Spring boot
Spring bootSpring boot
Spring boot
Bhagwat Kumar
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
tola99
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
NexThoughts Technologies
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
07.pallav
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
Josué Neis
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOP
Dzmitry Naskou
 
Spring Boot
Spring BootSpring Boot
Spring Boot
Jaran Flaath
 
Spring Boot Tutorial
Spring Boot TutorialSpring Boot Tutorial
Spring Boot Tutorial
Naphachara Rattanawilai
 
Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!
Jakub Kubrynski
 
Xke spring boot
Xke spring bootXke spring boot
Xke spring boot
sourabh aggarwal
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
Purbarun Chakrabarti
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
nomykk
 
Spring annotation
Spring annotationSpring annotation
Spring annotation
Rajiv Srivastava
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
Hùng Nguyễn Huy
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
Dzmitry Naskou
 
Spring Boot
Spring BootSpring Boot
Spring Boot
koppenolski
 
Introduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoCIntroduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoC
Funnelll
 

What's hot (20)

Spring boot jpa
Spring boot jpaSpring boot jpa
Spring boot jpa
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introduction
 
Spring boot
Spring bootSpring boot
Spring boot
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOP
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring Boot Tutorial
Spring Boot TutorialSpring Boot Tutorial
Spring Boot Tutorial
 
Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!
 
Xke spring boot
Xke spring bootXke spring boot
Xke spring boot
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
Spring annotation
Spring annotationSpring annotation
Spring annotation
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Introduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoCIntroduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoC
 

Similar to Spring boot

Spring boot vs spring framework razor sharp web applications
Spring boot vs spring framework razor sharp web applicationsSpring boot vs spring framework razor sharp web applications
Spring boot vs spring framework razor sharp web applications
Katy Slemon
 
Module 6 _ Spring Boot for java application to begin
Module 6 _ Spring Boot for java application to beginModule 6 _ Spring Boot for java application to begin
Module 6 _ Spring Boot for java application to begin
Deepakprasad838637
 
Spring Boot
Spring BootSpring Boot
Spring Boot
Jaydeep Kale
 
Spring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsSpring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggets
Virtual Nuggets
 
Spring framework-tutorial
Spring framework-tutorialSpring framework-tutorial
Spring framework-tutorial
vinayiqbusiness
 
Spring framework
Spring frameworkSpring framework
Spring framework
Shivi Kashyap
 
Jetspeed-2 Overview
Jetspeed-2 OverviewJetspeed-2 Overview
Jetspeed-2 Overview
bettlebrox
 
Spring notes
Spring notesSpring notes
Spring notes
Rajeev Uppala
 
Spring Framework Rohit
Spring Framework RohitSpring Framework Rohit
Spring Framework Rohit
Rohit Prabhakar
 
SPring boot.pptx
SPring boot.pptxSPring boot.pptx
SPring boot.pptx
KartikSang2
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
ASG
 
Spring boot.pptx
Spring boot.pptxSpring boot.pptx
Spring boot.pptx
KartikSang2
 
How Spring Framework Really Works?
How Spring Framework Really Works?How Spring Framework Really Works?
How Spring Framework Really Works?
NexSoftsys
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
Hamid Ghorbani
 
Spring framework
Spring frameworkSpring framework
Spring framework
Kani Selvam
 
Spring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applicationsSpring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applications
michaelaaron25322
 
Introduction to Spring sec1.pptx
Introduction to Spring sec1.pptxIntroduction to Spring sec1.pptx
Introduction to Spring sec1.pptx
NourhanTarek23
 
Spring presentecion isil
Spring presentecion isilSpring presentecion isil
Spring presentecion isil
Willy Aguirre
 
Spring presentecion isil
Spring presentecion isilSpring presentecion isil
Spring presentecion isil
Willy Aguirre
 
Spring core module
Spring core moduleSpring core module
Spring core module
Raj Tomar
 

Similar to Spring boot (20)

Spring boot vs spring framework razor sharp web applications
Spring boot vs spring framework razor sharp web applicationsSpring boot vs spring framework razor sharp web applications
Spring boot vs spring framework razor sharp web applications
 
Module 6 _ Spring Boot for java application to begin
Module 6 _ Spring Boot for java application to beginModule 6 _ Spring Boot for java application to begin
Module 6 _ Spring Boot for java application to begin
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsSpring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggets
 
Spring framework-tutorial
Spring framework-tutorialSpring framework-tutorial
Spring framework-tutorial
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Jetspeed-2 Overview
Jetspeed-2 OverviewJetspeed-2 Overview
Jetspeed-2 Overview
 
Spring notes
Spring notesSpring notes
Spring notes
 
Spring Framework Rohit
Spring Framework RohitSpring Framework Rohit
Spring Framework Rohit
 
SPring boot.pptx
SPring boot.pptxSPring boot.pptx
SPring boot.pptx
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Spring boot.pptx
Spring boot.pptxSpring boot.pptx
Spring boot.pptx
 
How Spring Framework Really Works?
How Spring Framework Really Works?How Spring Framework Really Works?
How Spring Framework Really Works?
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Spring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applicationsSpring data jpa are used to develop spring applications
Spring data jpa are used to develop spring applications
 
Introduction to Spring sec1.pptx
Introduction to Spring sec1.pptxIntroduction to Spring sec1.pptx
Introduction to Spring sec1.pptx
 
Spring presentecion isil
Spring presentecion isilSpring presentecion isil
Spring presentecion isil
 
Spring presentecion isil
Spring presentecion isilSpring presentecion isil
Spring presentecion isil
 
Spring core module
Spring core moduleSpring core module
Spring core module
 

Recently uploaded

Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
David Wilson
 
The Path to General-Purpose Robots - Coatue
The Path to General-Purpose Robots - CoatueThe Path to General-Purpose Robots - Coatue
The Path to General-Purpose Robots - Coatue
Razin Mustafiz
 
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
FIDO Alliance
 
Welcome to Cyberbiosecurity. Because regular cybersecurity wasn't complicated...
Welcome to Cyberbiosecurity. Because regular cybersecurity wasn't complicated...Welcome to Cyberbiosecurity. Because regular cybersecurity wasn't complicated...
Welcome to Cyberbiosecurity. Because regular cybersecurity wasn't complicated...
Snarky Security
 
NVIDIA at Breakthrough Discuss for Space Exploration
NVIDIA at Breakthrough Discuss for Space ExplorationNVIDIA at Breakthrough Discuss for Space Exploration
NVIDIA at Breakthrough Discuss for Space Exploration
Alison B. Lowndes
 
Demystifying Neural Networks And Building Cybersecurity Applications
Demystifying Neural Networks And Building Cybersecurity ApplicationsDemystifying Neural Networks And Building Cybersecurity Applications
Demystifying Neural Networks And Building Cybersecurity Applications
Priyanka Aash
 
Intel Unveils Core Ultra 200V Lunar chip .pdf
Intel Unveils Core Ultra 200V Lunar chip .pdfIntel Unveils Core Ultra 200V Lunar chip .pdf
Intel Unveils Core Ultra 200V Lunar chip .pdf
Tech Guru
 
Perth MuleSoft Meetup July 2024
Perth MuleSoft Meetup July 2024Perth MuleSoft Meetup July 2024
Perth MuleSoft Meetup July 2024
Michael Price
 
Integrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecaseIntegrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecase
shyamraj55
 
Retrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with RagasRetrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with Ragas
Zilliz
 
Discovery Series - Zero to Hero - Task Mining Session 1
Discovery Series - Zero to Hero - Task Mining Session 1Discovery Series - Zero to Hero - Task Mining Session 1
Discovery Series - Zero to Hero - Task Mining Session 1
DianaGray10
 
Redefining Cybersecurity with AI Capabilities
Redefining Cybersecurity with AI CapabilitiesRedefining Cybersecurity with AI Capabilities
Redefining Cybersecurity with AI Capabilities
Priyanka Aash
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
ldtexsolbl
 
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and DisadvantagesBLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
SAI KAILASH R
 
Connector Corner: Leveraging Snowflake Integration for Smarter Decision Making
Connector Corner: Leveraging Snowflake Integration for Smarter Decision MakingConnector Corner: Leveraging Snowflake Integration for Smarter Decision Making
Connector Corner: Leveraging Snowflake Integration for Smarter Decision Making
DianaGray10
 
Camunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptxCamunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptx
ZachWylie3
 
Choosing the Best Outlook OST to PST Converter: Key Features and Considerations
Choosing the Best Outlook OST to PST Converter: Key Features and ConsiderationsChoosing the Best Outlook OST to PST Converter: Key Features and Considerations
Choosing the Best Outlook OST to PST Converter: Key Features and Considerations
webbyacad software
 
COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...
COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...
COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...
AimanAthambawa1
 
Finetuning GenAI For Hacking and Defending
Finetuning GenAI For Hacking and DefendingFinetuning GenAI For Hacking and Defending
Finetuning GenAI For Hacking and Defending
Priyanka Aash
 
Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...
Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...
Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...
OnBoard
 

Recently uploaded (20)

Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
 
The Path to General-Purpose Robots - Coatue
The Path to General-Purpose Robots - CoatueThe Path to General-Purpose Robots - Coatue
The Path to General-Purpose Robots - Coatue
 
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
 
Welcome to Cyberbiosecurity. Because regular cybersecurity wasn't complicated...
Welcome to Cyberbiosecurity. Because regular cybersecurity wasn't complicated...Welcome to Cyberbiosecurity. Because regular cybersecurity wasn't complicated...
Welcome to Cyberbiosecurity. Because regular cybersecurity wasn't complicated...
 
NVIDIA at Breakthrough Discuss for Space Exploration
NVIDIA at Breakthrough Discuss for Space ExplorationNVIDIA at Breakthrough Discuss for Space Exploration
NVIDIA at Breakthrough Discuss for Space Exploration
 
Demystifying Neural Networks And Building Cybersecurity Applications
Demystifying Neural Networks And Building Cybersecurity ApplicationsDemystifying Neural Networks And Building Cybersecurity Applications
Demystifying Neural Networks And Building Cybersecurity Applications
 
Intel Unveils Core Ultra 200V Lunar chip .pdf
Intel Unveils Core Ultra 200V Lunar chip .pdfIntel Unveils Core Ultra 200V Lunar chip .pdf
Intel Unveils Core Ultra 200V Lunar chip .pdf
 
Perth MuleSoft Meetup July 2024
Perth MuleSoft Meetup July 2024Perth MuleSoft Meetup July 2024
Perth MuleSoft Meetup July 2024
 
Integrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecaseIntegrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecase
 
Retrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with RagasRetrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with Ragas
 
Discovery Series - Zero to Hero - Task Mining Session 1
Discovery Series - Zero to Hero - Task Mining Session 1Discovery Series - Zero to Hero - Task Mining Session 1
Discovery Series - Zero to Hero - Task Mining Session 1
 
Redefining Cybersecurity with AI Capabilities
Redefining Cybersecurity with AI CapabilitiesRedefining Cybersecurity with AI Capabilities
Redefining Cybersecurity with AI Capabilities
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
 
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and DisadvantagesBLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
 
Connector Corner: Leveraging Snowflake Integration for Smarter Decision Making
Connector Corner: Leveraging Snowflake Integration for Smarter Decision MakingConnector Corner: Leveraging Snowflake Integration for Smarter Decision Making
Connector Corner: Leveraging Snowflake Integration for Smarter Decision Making
 
Camunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptxCamunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptx
 
Choosing the Best Outlook OST to PST Converter: Key Features and Considerations
Choosing the Best Outlook OST to PST Converter: Key Features and ConsiderationsChoosing the Best Outlook OST to PST Converter: Key Features and Considerations
Choosing the Best Outlook OST to PST Converter: Key Features and Considerations
 
COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...
COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...
COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...
 
Finetuning GenAI For Hacking and Defending
Finetuning GenAI For Hacking and DefendingFinetuning GenAI For Hacking and Defending
Finetuning GenAI For Hacking and Defending
 
Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...
Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...
Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...
 

Spring boot

  • 2. AGENDA  Introduction  Spring Boot vs Spring vs Spring MVC  Advantages  Where to start and how does Spring boot work ?  Dependency Management  Logging  Exception Handling  Database Handling  Q &A  Talks and videos SPRING BOOT 2
  • 3. Introduction  Spring Boot provides a good platform for Java developers to develop a stand-alone and production-grade spring application that you can just run. You can get started with minimum configurations without the need for an entire Spring configuration setup. SPRING BOOT 3
  • 4. Spring Boot vs Spring vs Spring MVC  Spring  Most important feature of Spring Framework is Dependency Injection. At the core of all Spring Modules is Dependency Injection or IOC Inversion of Control.  Spring MVC  Spring MVC Framework provides decoupled way of developing web applications. With simple concepts like Dispatcher Servlet, ModelAndView and View Resolver, it makes it easy to develop web applications.  Spring Boot  Auto Configuration  Built around well known patterns SPRING BOOT 4
  • 5. Advantages  It provides a flexible way to configure Java Beans, XML configurations, and Database Transactions.  It provides a powerful batch processing and manages REST endpoints.  In Spring Boot, everything is auto configured; no manual configurations are needed.  It offers annotation-based spring application  Eases dependency management  It includes Embedded Servlet Container SPRING BOOT 5
  • 6. Where to start and how does Spring boot work ?  Kindly visit https://start.spring.io/ to start your spring boot application.  Entry point for spring boot application is the class that contains @SpringBootApplication annotation and the main method.  @EnableAutoConfiguration, @ComponentScan and @SpringBootConfiguration  @EnableAutoConfiguration autoconfigures dependencies present in project.  @ComponentScan scans all the components in the projects.  Spring Boot Starters are used to manage dependencies.  Eg: spring-boot-starter-data-jpa, spring-boot-starter-web 6 SPRING BOOT
  • 7. Dependency Management  Spring Boot team provides a list of dependencies to support the Spring Boot version for its every release. You do not need to provide a version for dependencies in the build configuration file. Spring Boot automatically configures the dependencies version based on the release. Remember that when you upgrade the Spring Boot version, dependencies also will upgrade automatically.  In Spring Boot, we can use Spring Framework to define our beans and their dependency injection. The @ComponentScan annotation is used to find beans and the corresponding injected with @Autowired annotation. 7 SPRING BOOT
  • 8. Logging  Spring Boot uses Apache Commons logging for all internal logging.  Spring Boot’s default configurations provides a support for the use of Java Util Logging, Log4j2, and Logback.  By using Spring Boot Starters, Logback will provide a good support for logging. 8 SPRING BOOT
  • 9. Exception Handling  The @ControllerAdvice is an annotation, to handle the exceptions globally.  The @ExceptionHandler is an annotation used to handle the specific exceptions and sending the custom responses to the client.  Sample code snippet:  @ControllerAdvice public class ProductExceptionController { @ExceptionHandler(value = ProductNotfoundException.class) public ResponseEntity<Object> exception(ProductNotfoundException exception) { return new ResponseEntity<>("Product not found", HttpStatus.NOT_FOUND); } } 9 SPRING BOOT
  • 10. Database Handling  Spring Boot provides a very good support to create a DataSource for Database. We need not write any extra code to create a DataSource in Spring Boot. Just adding the dependencies and doing the configuration details is enough to create a DataSource and connect the Database. 10 SPRING BOOT
  • 12. Talks and videos  https://www.tutorialspoint.com/spring_boot/index.htm  It’s a Kind of Magic: Under the Covers of Spring Boot  What’s New in Spring Boot 2.0  Test Driven Development with Spring Boot  From Zero to Hero with Spring Boot 2.0 Thank You 12 SPRING BOOT