Spring boot

Udulatharupathi
3 min readMay 15, 2022

What is a spring boot?

Spring Boot is a Java-based open-source framework for developing microservices. The Pivotal Team created it, and it’s used to create standalone and production-ready spring apps. Spring Boot is a good platform for Java developers to create a stand-alone, production-ready spring application that can be run straight away. You can get started with just a few configurations rather than a full Spring configuration.

Why Is Spring Boot So Popular?

First and mainly, it employs Java, one of the most widely used programming languages in the world. Aside from that, Spring Boot is a fantastic solution for quickly getting enterprise-grade apps up and running without having to worry about correctly and safely configuring them.
In addition, the user base is enormous. There are many free learning materials and courses available online. Education’s accessibility has had a significant impact on the framework’s appeal.

Advantages of SpringBoot

  • Easy to understand and develop spring applications
  • Reduces the development time
  • Increases productivity

Goals of SpringBoot

  • To avoid complex XML configuration in Spring
  • Offer an easier way of getting started with the application
  • To develop a production-ready Spring application in an easier way

Benefits of SpringBoot

  1. Standalone Application — Can simply build the application jar and run the application with no need to customize the deployment.
  2. Production-Like Features — Health checks, metrics, and externalized configurations.
  3. Auto-Configurable — Spring and other 3rd party frameworks will be configured automatically.
  4. Embedded Servers — Comes with prebuilt Tomcat, Jetty, and Undertow application servers that do not require further installation to use. This also provides faster more efficient deployments resulting in short restart times.
  5. Starter Dependencies — This will provide opinionated dependencies designed to simplify the build configuration. This also provides complete build tool flexibility (Maven and Gradle).

How does it work

Some people may be wondering how Spring Boot has auto setups and what that means. This feature is essentially provided by three simple Spring Boot annotations:

  • @SpringBootApplication
  • @EnableAutoConfiguration
  • @ComponentScan

Between each one of these annotations, Spring Boot is able to provide default project dependencies as well as allow for defaults to overwritten

Spring Boot Starter Actuator dependency is used to monitor and manage your application. Its code is shown below −

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

Spring Boot Starter Security dependency is used for Spring Security. Its code is shown below −

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>

Spring Boot Starter web dependency is used to write a Rest Endpoints. Its code is shown below −

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

Spring Boot Starter Thyme Leaf dependency is used to create a web application. Its code is shown below −

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

Spring Boot Starter Test dependency is used for writing Test cases. Its code is shown below −

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>

--

--