top of page

Spring Boot Introduction

Updated: Sep 30, 2021

Spring Boot is an opinionated addition to the Spring platform, focused on convention over configuration — highly useful for getting started with minimum effort and creating standalone, production-grade applications.


Why should we use Spring Boot Framework?

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.

Along with the Spring Boot Framework, many other Spring sis

How to Setup Sping Boot?


Step 1: Open the Spring initializr https://start.spring.io.


Step 2: Provide the Group and Artifact name. We have provided Group name com.myapp and Artifact spring-boot-example.


Step 3: Now click on the Generate button.


Step 4: Extract the RAR file.


Step 5:

Import the folder.

File -> Import -> Existing Maven Project -> Next -> Browse -> Select the project -> Finish


Step 6: Run the SpringBootExampleApplication.java file.



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.

Goal 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.

Comments


bottom of page