SlideShare a Scribd company logo
Spring Boot
Prepared
By:-
Kale Jaydeep
Spring Boot
Zero Configuration In-built Server
Starter POM Rapid Application Development
Spring Boot
Learn
Brain
1. Spring Boot an open source Java-based framework
developed by Pivotal Team.
2. Spring Boot makes it easy to create stand-alone,
production-grade Spring based Applications that you can
"just run".
3. Spring Boot provides production-ready features such as
metrics, health checks and externalized configuration.
4. It simplifies the bootstrapping and development of Spring
Applications.
5. Spring Boot reduces application development time
6. Spring Boot provides Embedded HTTP servers like
Tomcat, Jetty etc. to develop and test our web applications
very easily.
Spring Boot Starter
1. The main intention of Spring Boot Starter is to
combine a group of common or related
dependencies into single dependencies.
2. If we want to prepare any web application with
tomcat server and with Database then we have to
add the number of Jars like Spring bean jar,
Spring core jar, Spring context jar etc.
3. The above approach will increase no of
dependencies in our build file, it will increase
build file size and it is very much difficult task to
manage all these dependencies
Spring Boot Starter cont.
4. To overcome all the above problems, we have
to use Spring Boot Starter Component
5. > Spring Boot Starter component combines all
related jars into single jar file so that we can add
only jar file dependency to our build files instead
of adding above jars files to our build file, we
need to add one and only one jar file like spring-
boot-starter-web jar file.
6. When we add spring-boot-starter-web jar file
dependency to our build file, then Spring Boot
Framework will automatically download all
required jars and add to our project classpath.
Spring Boot AutoConfigurator
1. In general, in spring based applications we have to provide lot of configuration
details either through XML files or through Annotations.
EX: Beans configurations and their dependencies
HandlerMapping Configuration
ViewResolver configurations
Spring Boot AutoConfigurator cont..
2. To avoid all the above configurations Spring Boot has provided an
autoConfigurator. Spring Boot Autoconfigurator will come automatically when we
add "spring-boot-starter-web" dependency in build file, it will resolve views and
Viewresolvers in Spring web MVC applications with out having Spring
configuration file and if we use @SpringBootApplication annotation then it will
avoid the explicit utilization of @Configuration, @ComponentScan and
@EnableAutoConfiguration and provide them all these annotations to the Java
Class internally.
@SpringBootApplication = @Confioguration + @ComponentScan + @EnableAutoConfiguration
Ways to create Spring Boot Project
1. Using Simple MAVEN project in Eclipse IDE.
2. STS IDE
3. Spring Boot Initializer
4. Spring Boot CLI[Command Line Interface]
POM.xml
1. It is Project Object Model (POM) file.
2. It serves as the central configuration file for your Spring
Boot project and is used by Maven to manage the build,
dependencies, and other project-related tasks.
3. <groupId>, <artifactId>, and <version> specify the
unique identifier, name, and version of your project.
4. <properties> allows you to define project-specific
properties, such as the Java version
5. <dependencies> lists the dependencies required for
your Spring Boot application. You can add additional
dependencies specific to your project here.
Application.properties
1.In Spring Boot, the application.properties file is a
configuration file used to define various properties for your
application. It is typically located in the src/main/resources
directory of your Spring Boot project.
2. This file may contain following code.
Annotations
@SpringBootApplication
This annotation is typically used at the main class level and
combines three other annotations: @Configuration,
@EnableAutoConfiguration, and @ComponentScan. It
enables Spring Boot's auto-configuration, component
scanning, and configuration capabilities.
@Controller
The @Controller annotation is used in Spring Boot to
indicate that a class serves as a controller component in a
web application. It is typically applied to classes that
handle incoming requests, perform processing, and return
responses.
@RestController
The @RestController annotation in Spring Boot is a
specialized version of the @Controller annotation. It is
used to indicate that a class serves as a RESTful web
service controller, where the methods within the class are
responsible for handling incoming requests and returning
responses in a RESTful manner.
@Autowired
This annotation is used for automatic dependency
injection. It allows Spring to automatically wire
dependencies into beans. You can apply it to fields,
constructors, or setter methods to indicate the
dependencies that need to be injected.
@Service
This annotation is used to mark a class as a service
component. It is typically applied to classes that provide
business logic or perform specific operations within the
application.
@Repository
This annotation is used to mark a class as a repository
component. It is commonly applied to classes that interact
with the database or external data sources.
@GetMapping
The @GetMapping annotation is used in Spring Boot to
handle HTTP GET requests mapped to specific URL paths.
It is a shortcut for the combination of @RequestMapping
with the HTTP method set to GET.
@PostMapping
The @PostMapping annotation is used in Spring Boot to
handle HTTP POST requests mapped to specific URL
paths. It is a shortcut for the combination of
@RequestMapping with the HTTP method set to POST.
@RequestParam
The @RequestParam annotation is used to bind individual
request parameters from the query string or form data to
method parameters in Spring Boot.
@RequestBody
The @RequestBody annotation in Spring Boot is used to
bind the request body to a method parameter. It indicates
that the incoming request body should be converted into
the specified method parameter type.

More Related Content

What's hot

Introduction to spring boot
Introduction to spring bootIntroduction to spring boot
Introduction to spring boot
Santosh Kumar Kar
 
Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!Jakub Kubrynski
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
Josué Neis
 
Spring Core
Spring CoreSpring Core
Spring Core
Pushan Bhattacharya
 
Testing Spring Boot Applications
Testing Spring Boot ApplicationsTesting Spring Boot Applications
Testing Spring Boot Applications
VMware Tanzu
 
Xke spring boot
Xke spring bootXke spring boot
Xke spring boot
sourabh aggarwal
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
Dzmitry Naskou
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introduction
Jonathan Holloway
 
Spring Boot
Spring BootSpring Boot
Spring Boot
Jaran Flaath
 
Spring boot
Spring bootSpring boot
Spring boot
Bhagwat Kumar
 
Spring data jpa
Spring data jpaSpring data jpa
Spring data jpa
Jeevesh Pandey
 
Formation jpa-hibernate-spring-data
Formation jpa-hibernate-spring-dataFormation jpa-hibernate-spring-data
Formation jpa-hibernate-spring-data
Lhouceine OUHAMZA
 
Spring framework in depth
Spring framework in depthSpring framework in depth
Spring framework in depth
Vinay Kumar
 
Spring boot
Spring bootSpring boot
Spring boot
Gyanendra Yadav
 
Spring Boot
Spring BootSpring Boot
Spring Boot
Jiayun Zhou
 
Spring Data JPA
Spring Data JPASpring Data JPA
Spring Data JPA
Knoldus Inc.
 
Microservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring CloudMicroservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring Cloud
Eberhard Wolff
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
Alex Movila
 
Spring framework Introduction
Spring framework IntroductionSpring framework Introduction
Spring framework Introduction
Anuj Singh Rajput
 
Formation Spring Avancé gratuite par Ippon 2014
Formation Spring Avancé gratuite par Ippon 2014Formation Spring Avancé gratuite par Ippon 2014
Formation Spring Avancé gratuite par Ippon 2014
Ippon
 

What's hot (20)

Introduction to spring boot
Introduction to spring bootIntroduction to spring boot
Introduction to spring boot
 
Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
 
Spring Core
Spring CoreSpring Core
Spring Core
 
Testing Spring Boot Applications
Testing Spring Boot ApplicationsTesting Spring Boot Applications
Testing Spring Boot Applications
 
Xke spring boot
Xke spring bootXke spring boot
Xke spring boot
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introduction
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring boot
Spring bootSpring boot
Spring boot
 
Spring data jpa
Spring data jpaSpring data jpa
Spring data jpa
 
Formation jpa-hibernate-spring-data
Formation jpa-hibernate-spring-dataFormation jpa-hibernate-spring-data
Formation jpa-hibernate-spring-data
 
Spring framework in depth
Spring framework in depthSpring framework in depth
Spring framework in depth
 
Spring boot
Spring bootSpring boot
Spring boot
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring Data JPA
Spring Data JPASpring Data JPA
Spring Data JPA
 
Microservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring CloudMicroservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring Cloud
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
 
Spring framework Introduction
Spring framework IntroductionSpring framework Introduction
Spring framework Introduction
 
Formation Spring Avancé gratuite par Ippon 2014
Formation Spring Avancé gratuite par Ippon 2014Formation Spring Avancé gratuite par Ippon 2014
Formation Spring Avancé gratuite par Ippon 2014
 

Similar to Spring Boot

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
 
SpringBootCompleteBootcamp.pptx
SpringBootCompleteBootcamp.pptxSpringBootCompleteBootcamp.pptx
SpringBootCompleteBootcamp.pptx
SUFYAN SATTAR
 
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
 
Spring boot jpa
Spring boot jpaSpring boot jpa
Spring boot jpa
Hamid Ghorbani
 
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
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
nomykk
 
Spring framework Controllers and Annotations
Spring framework   Controllers and AnnotationsSpring framework   Controllers and Annotations
Spring framework Controllers and Annotations
Anuj Singh Rajput
 
Spring boot
Spring bootSpring boot
Jetspeed-2 Overview
Jetspeed-2 OverviewJetspeed-2 Overview
Jetspeed-2 Overview
bettlebrox
 
Spring Boot
Spring BootSpring Boot
Spring Boot
HongSeong Jeon
 
Spring annotations notes
Spring annotations notesSpring annotations notes
Spring annotations notes
Vipul Singh
 
Springboot2 postgresql-jpa-hibernate-crud-example with test
Springboot2 postgresql-jpa-hibernate-crud-example with testSpringboot2 postgresql-jpa-hibernate-crud-example with test
Springboot2 postgresql-jpa-hibernate-crud-example with test
HyukSun Kwon
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
tola99
 
Spring boot for buidling microservices
Spring boot for buidling microservicesSpring boot for buidling microservices
Spring boot for buidling microservices
Nilanjan Roy
 
Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Gunith Devasurendra
 
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdfdokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
Appster1
 
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdfdokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
Appster1
 
Spring User Guide
Spring User GuideSpring User Guide
Spring User Guide
Muthuselvam RS
 
Spring Boot Whirlwind Tour
Spring Boot Whirlwind TourSpring Boot Whirlwind Tour
Spring Boot Whirlwind Tour
VMware Tanzu
 
Spring review_for Semester II of Year 4
Spring review_for Semester II of Year 4Spring review_for Semester II of Year 4
Spring review_for Semester II of Year 4
than sare
 

Similar to Spring Boot (20)

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
 
SpringBootCompleteBootcamp.pptx
SpringBootCompleteBootcamp.pptxSpringBootCompleteBootcamp.pptx
SpringBootCompleteBootcamp.pptx
 
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
 
Spring boot jpa
Spring boot jpaSpring boot jpa
Spring boot jpa
 
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
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
Spring framework Controllers and Annotations
Spring framework   Controllers and AnnotationsSpring framework   Controllers and Annotations
Spring framework Controllers and Annotations
 
Spring boot
Spring bootSpring boot
Spring boot
 
Jetspeed-2 Overview
Jetspeed-2 OverviewJetspeed-2 Overview
Jetspeed-2 Overview
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring annotations notes
Spring annotations notesSpring annotations notes
Spring annotations notes
 
Springboot2 postgresql-jpa-hibernate-crud-example with test
Springboot2 postgresql-jpa-hibernate-crud-example with testSpringboot2 postgresql-jpa-hibernate-crud-example with test
Springboot2 postgresql-jpa-hibernate-crud-example with test
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
Spring boot for buidling microservices
Spring boot for buidling microservicesSpring boot for buidling microservices
Spring boot for buidling microservices
 
Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)
 
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdfdokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
 
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdfdokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
 
Spring User Guide
Spring User GuideSpring User Guide
Spring User Guide
 
Spring Boot Whirlwind Tour
Spring Boot Whirlwind TourSpring Boot Whirlwind Tour
Spring Boot Whirlwind Tour
 
Spring review_for Semester II of Year 4
Spring review_for Semester II of Year 4Spring review_for Semester II of Year 4
Spring review_for Semester II of Year 4
 

Recently uploaded

ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
Kamal Acharya
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
MuhammadTufail242431
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 

Recently uploaded (20)

ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 

Spring Boot

  • 2. Spring Boot Zero Configuration In-built Server Starter POM Rapid Application Development
  • 3. Spring Boot Learn Brain 1. Spring Boot an open source Java-based framework developed by Pivotal Team. 2. Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". 3. Spring Boot provides production-ready features such as metrics, health checks and externalized configuration. 4. It simplifies the bootstrapping and development of Spring Applications. 5. Spring Boot reduces application development time 6. Spring Boot provides Embedded HTTP servers like Tomcat, Jetty etc. to develop and test our web applications very easily.
  • 4. Spring Boot Starter 1. The main intention of Spring Boot Starter is to combine a group of common or related dependencies into single dependencies. 2. If we want to prepare any web application with tomcat server and with Database then we have to add the number of Jars like Spring bean jar, Spring core jar, Spring context jar etc. 3. The above approach will increase no of dependencies in our build file, it will increase build file size and it is very much difficult task to manage all these dependencies
  • 5. Spring Boot Starter cont. 4. To overcome all the above problems, we have to use Spring Boot Starter Component 5. > Spring Boot Starter component combines all related jars into single jar file so that we can add only jar file dependency to our build files instead of adding above jars files to our build file, we need to add one and only one jar file like spring- boot-starter-web jar file. 6. When we add spring-boot-starter-web jar file dependency to our build file, then Spring Boot Framework will automatically download all required jars and add to our project classpath.
  • 6. Spring Boot AutoConfigurator 1. In general, in spring based applications we have to provide lot of configuration details either through XML files or through Annotations. EX: Beans configurations and their dependencies HandlerMapping Configuration ViewResolver configurations
  • 7. Spring Boot AutoConfigurator cont.. 2. To avoid all the above configurations Spring Boot has provided an autoConfigurator. Spring Boot Autoconfigurator will come automatically when we add "spring-boot-starter-web" dependency in build file, it will resolve views and Viewresolvers in Spring web MVC applications with out having Spring configuration file and if we use @SpringBootApplication annotation then it will avoid the explicit utilization of @Configuration, @ComponentScan and @EnableAutoConfiguration and provide them all these annotations to the Java Class internally. @SpringBootApplication = @Confioguration + @ComponentScan + @EnableAutoConfiguration
  • 8. Ways to create Spring Boot Project 1. Using Simple MAVEN project in Eclipse IDE. 2. STS IDE 3. Spring Boot Initializer 4. Spring Boot CLI[Command Line Interface]
  • 9. POM.xml 1. It is Project Object Model (POM) file. 2. It serves as the central configuration file for your Spring Boot project and is used by Maven to manage the build, dependencies, and other project-related tasks. 3. <groupId>, <artifactId>, and <version> specify the unique identifier, name, and version of your project. 4. <properties> allows you to define project-specific properties, such as the Java version 5. <dependencies> lists the dependencies required for your Spring Boot application. You can add additional dependencies specific to your project here.
  • 10. Application.properties 1.In Spring Boot, the application.properties file is a configuration file used to define various properties for your application. It is typically located in the src/main/resources directory of your Spring Boot project. 2. This file may contain following code.
  • 12. @SpringBootApplication This annotation is typically used at the main class level and combines three other annotations: @Configuration, @EnableAutoConfiguration, and @ComponentScan. It enables Spring Boot's auto-configuration, component scanning, and configuration capabilities.
  • 13. @Controller The @Controller annotation is used in Spring Boot to indicate that a class serves as a controller component in a web application. It is typically applied to classes that handle incoming requests, perform processing, and return responses.
  • 14. @RestController The @RestController annotation in Spring Boot is a specialized version of the @Controller annotation. It is used to indicate that a class serves as a RESTful web service controller, where the methods within the class are responsible for handling incoming requests and returning responses in a RESTful manner.
  • 15. @Autowired This annotation is used for automatic dependency injection. It allows Spring to automatically wire dependencies into beans. You can apply it to fields, constructors, or setter methods to indicate the dependencies that need to be injected.
  • 16. @Service This annotation is used to mark a class as a service component. It is typically applied to classes that provide business logic or perform specific operations within the application.
  • 17. @Repository This annotation is used to mark a class as a repository component. It is commonly applied to classes that interact with the database or external data sources.
  • 18. @GetMapping The @GetMapping annotation is used in Spring Boot to handle HTTP GET requests mapped to specific URL paths. It is a shortcut for the combination of @RequestMapping with the HTTP method set to GET.
  • 19. @PostMapping The @PostMapping annotation is used in Spring Boot to handle HTTP POST requests mapped to specific URL paths. It is a shortcut for the combination of @RequestMapping with the HTTP method set to POST.
  • 20. @RequestParam The @RequestParam annotation is used to bind individual request parameters from the query string or form data to method parameters in Spring Boot.
  • 21. @RequestBody The @RequestBody annotation in Spring Boot is used to bind the request body to a method parameter. It indicates that the incoming request body should be converted into the specified method parameter type.