You are on page 1of 10

SPRING BOOT USING MAVEN

What is Spring Boot with example?

 Spring Boot Auto Configuration automatically configures your


Spring application based on the JAR dependencies you added in the
project.
 For example, if MySQL database is on your class path, but you have
not configured any database connection, then Spring Boot auto
configures an in-memory database.
Features :
 Create stand-alone Spring applications.

 Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files).

 Provide opinionated 'starter' dependencies to simplify your build


Configuration.

 Automatically configure Spring and 3rd party libraries whenever possible.

 Provide production-ready features such as metrics, health checks, and


externalized configuration.

 Absolutely no code generation and no requirement for XML configuration.


What is Maven in Spring Boot?

o The Spring Boot Maven Plugin provides Spring Boot


support in Apache Maven.
o It allows you to package executable jar or war archives,
run Spring Boot applications, generate build information
and start your Spring Boot application prior to running
integration tests.
What is REST API in Spring Boot?

• The REST architecture builds web services that are accessible


through URLs using one of four request verbs:
* POST,
* GET,
* PUT, and
* DELETE.
• So, you could say a REST API is software that allows you to
create, read, update, and delete resources via URLs.
• You can learn how to create a REST API using Spring Boot.
Why is Maven used?

Maven is written in Java and is used to build projects


written in C#, Scala, Ruby, etc. Based on the Project
Object Model (POM), this tool has made the lives of
Java developers easier while developing reports, checks
build and testing automation setups.
How to write a API in Spring Boot?

Step 1: Setup Development Environment.

Step 2: Create a Spring Boot Project.

Set the following options.

Click on the “Add Dependencies” button and add the following dependencies.

Step 3: Create Entity Class.

Step 4: Create Repository Interface.

Step 5: Create A Service Class.


Purpose of Spring Boot?

 Spring Boot helps developers build applications


with ease and with far less toil than other
competing paradigms.
 Embedded web servers, auto-configuration, and
“fat jars” help you get started quickly, and
innovations like LiveReload in Spring DevTools
mean developers can iterate faster than ever
before.
 An opinionated approach to configuration.
 The ability to create standalone applications.
Advantages of Spring Boot:

 It reduces lots of development time and increases


productivity.
 It avoids writing lots of boilerplate Code,
Annotations and XML Configuration.
 It is very easy to integrate Spring Boot Application
with its Spring Ecosystem like Spring JDBC, Spring
ORM, Spring Data, Spring Security etc.
THANK YOU

You might also like