0% found this document useful (0 votes)
18 views

Spring Boot Notes

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Spring Boot Notes

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1) What is Spring Boot?

Ans:

Spring Boot is a project that is built on the top of the Spring Framework

 It provides an easier and faster way to set up, configure, and run both simple and
web-based applications.
 It is a Spring module that provides the RAD (Rapid Application Development) feature
to the Spring Framework.
 It is used to create a stand-alone Spring-based application that you can just run
because it needs minimal Spring configuration.
 Spring Boot is the combination of Spring Framework and Embedded Servers.
 In Spring Boot, there is no requirement for XML configuration

2) Why should we use Spring Boot Framework?

Ans:

We should use Spring Boot Framework because:

 The dependency injection approach is used in Spring Boot.


 It contains powerful database transaction management capabilities.
 It simplifies integration with other Java frameworks like JPA/Hibernate ORM,
Struts, etc.
 It reduces the cost and development time of the application.

3)Advantages of Spring Boot?

Ans:

 It creates stand-alone Spring applications that can be started using Java -jar.
 It tests web applications easily with the help of different Embedded HTTP servers
such as Tomcat, Jetty, etc. We don't need to deploy WAR files.
 It provides opinionated 'starter' POMs to simplify our Maven configuration.
 There is no requirement for XML configuration.
 It increases productivity and reduces development time.

4) Spring vs. Spring Boot vs. Spring MVC?

Ans:

Spring:

 Spring Framework is the most popular application development framework of Java.


 The main feature of the Spring Framework is dependency Injection or Inversion of
Control (IoC).
 With the help of Spring Framework, we can develop a loosely coupled application.
Spring Boot:

 Spring Boot is a module of Spring Framework.


 It allows us to build a stand-alone application with minimal or zero configurations.
 It is better to use if we want to develop a simple Spring-based application or RESTful services.

Spring MVC:

 Spring MVC is a Web MVC Framework for building web applications.


 It contains a lot of configuration files for various capabilities.
 It is an HTTP oriented web application development framework.

5) Spring Boot Architecture?

Ans:

 Spring Boot is a module of the Spring Framework.


 It is used to create stand-alone, production-grade Spring Based Applications with minimum
efforts.
 It is developed on top of the core Spring Framework.
 we must know the different layers and classes present in it.

There are four layers in Spring Boot are as follows:

o Presentation Layer
o Business Layer
o Persistence Layer
o Database Layer

Presentation Layer

o The presentation layer handles the HTTP requests, translates the JSON parameter to
object, and authenticates the request and transfer it to the business layer.
o In short, it consists of views i.e., frontend part.

Business Layer

o The business layer handles all the business logic.


o It consists of service classes and uses services provided by data access layers.
o It also performs authorization and validation.

Persistence Layer

o The persistence layer contains all the storage logic and translates business objects
from and to database rows.

Database Layer

o In the database layer, CRUD (create, retrieve, update, delete) operations are
performed.
6) Annotations?

Ans:

Core Spring Framework Annotations:

You might also like