0% found this document useful (0 votes)
81 views16 pages

Overview of Spring Boot Framework

Spring Boot is a framework that makes it easier to create stand-alone, production-grade Spring based applications that can be "just run". It reduces boilerplate configuration code and provides opinionated ways to configure Spring applications. Some key benefits of Spring Boot include reducing development time, providing production-ready features out of the box, and avoiding XML configuration.

Uploaded by

yashoda sailwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views16 pages

Overview of Spring Boot Framework

Spring Boot is a framework that makes it easier to create stand-alone, production-grade Spring based applications that can be "just run". It reduces boilerplate configuration code and provides opinionated ways to configure Spring applications. Some key benefits of Spring Boot include reducing development time, providing production-ready features out of the box, and avoiding XML configuration.

Uploaded by

yashoda sailwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Spring Boot

UNIT -V
What is Spring Boot

• 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.
Evolution of Spring Boot

• Spring Boot came into existence when in October 2012, a client, Mike
Youngstrom made a Jira request asking for bootstrapping the spring
framework so that it can be quickly started. And hence in early 2013,
Spring Boot was made.
• In April 2014, Spring Boot 1.0 was created followed by various versions.
• Spring Boot 1.1 on June 2014,
• 1.2 in March 2015,
• 1.3 in December 2016,
• 1.4 in January 2017 and
• Spring Boot 1.5 on February 2017.
What is Spring Boot

• 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 Cont..
Spring Boot

• In short, Spring Boot is the combination


of Spring Framework and Embedded
Servers.
• In Spring Boot, there is no requirement for
XML configuration (deployment descriptor).
It uses convention over configuration
software design paradigm that means it
decreases the effort of the developer.
• We can use Spring STS IDE or Spring
Initializr to develop Spring Boot Java
applications.
Why should we We should use Spring Boot Framework because:

use Spring Boot


Framework? 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.
Spring Boot

• Along with the Spring Boot Framework, many other Spring sister
projects help to build applications addressing modern business needs.
There are the following Spring sister projects are as follows:
• Spring Data: It simplifies data access from the relational
and NoSQL databases.
• Spring Batch: It provides powerful batch processing.
• Spring Security: It is a security framework that provides
robust security to applications.
• Spring Social: It supports integration with social networking like
LinkedIn.
• Spring Integration: It is an implementation of Enterprise Integration
Patterns. It facilitates integration with other enterprise
applications using lightweight messaging and declarative adapters.
Advantages of Spring Boot
• 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.
• It provides production-ready features such as metrics, health checks, and externalized configuration.
• There is no requirement for XML configuration.
• It offers a CLI tool for developing and testing the Spring Boot application.
• It offers the number of plug-ins.
• It also minimizes writing multiple boilerplate codes (the code that has to be included in many places with little or
no alteration), XML configuration, and annotations.
• It increases productivity and reduces development time.
Goals of Spring Boot

• The main goal of Spring Boot is to


reduce development, unit test, and integration
test time.
• Provides Opinionated Development approach
• Avoids defining more Annotation Configuration
• Avoids writing lots of import statements
• Avoids XML Configuration.
Spring Boot Features

• Web Development
• Spring Application
• Application events and listeners
• Admin features
• Externalized Configuration
• Properties Files
• YAML Support
• Type-safe Configuration
• Logging
• Security
Spring Boot Architecture

• To understand the architecture of Spring Boot, let us first see different layers and
classes present in it.
• Layers in Spring Boot: There are four main layers in Spring Boot:
• Presentation Layer: As the name suggests, it consists of views(i.e. frontend
part)
• Data Access Layer: CRUD (create, retrieve, update, delete) operations on the
database comes under this category.
• Service Layer: This consist of service classes and uses services provided by
data access layers.
• Integration Layer: It consists of web different web services(any service
available over the internet and uses XML messaging system).
Spring Boot flow architecture:
Architecture cont

All the services provided by the


classes are implemented in
Then we have utility classes,
their corresponding classes
validator classes and view
and are retrieved by
classes.
implementing the dependency
on those interfaces.
Architecture cont

• Since Spring boot uses all the features/modules of spring-like Spring data, Spring MVC etc.
so the architecture is almost the same as spring MVC, except for the fact that there is no
need of DAO and DAOImpl classes in Spring boot.
• Creating a data access layer needs just a repository class instead which is implementing
CRUD operation containing class.
• A client makes the https request(PUT/GET)
• Then it goes to controller and the controller mapped with that route as that of request
handles it, and calls the service logic if required.
• Business logic is performed in the service layer which might be performing the logic on the
data from the database which is mapped through JPA with model/entity class
• Finally, a JSP page is returned in the response if no error occurred.
Example

• https://www.techgalery.com
/2019/01/how-to-create-
spring-boot-project-
using.html#:~:text=File%20
%3E%20New%20Project%
20%3E%20Under%20cate
gories,spring%20boot%20
dependencies%20you%20
want.

You might also like