Spring boot

Hasaranga Wijesinghe
3 min readJul 1, 2022

Spring Boot is an open-source Java-based framework used to create a micro Service. It is developed by the Pivotal Team and is used to build stand-alone and production-ready spring applications. Spring Boot provides a good platform for Java developers to develop a stand-alone and production-grade spring application that you can just run. You can get started with minimum configurations without the need for an entire Spring configuration setup.

Why Is Spring Boot So Popular?

First of all, it makes use of Java, which is one of the most popular programming languages in the world. Besides that, Spring Boot is an amazing tool that helps you to get enterprise-grade applications up and running quickly without having to worry about configuring your application correctly and safely.

Also, the user community is huge. If you want free learning materials and courses, you’ll find plenty out there. The accessibility of education has had a big impact on the framework’s popularity.

Advantages of SpringBoot

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

Goals of SpringBoot

  • To avoid complex XML configuration in Spring
  • To develop a production-ready Spring application in an easier way
  • To reduce the development time and run the application independently
  • Offer an easier way of getting started with the application

Benefits of SpringBoot

  1. Standalone Application — Can simply build the application jar and run the application with no need to customize the deployment.
  2. 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 to shorting restart times.
  3. Auto-Configurable — Spring and other 3rd party frameworks will be configured automatically.
  4. Production-Like Features — Health checks, metrics and externalized configurations.
  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 may be asking themselves how Spring Boot has auto configurations and what does that really mean? It really comes down to three simple Spring Boot annotations that provide this feature:

  • @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>

Final Thoughts

By today’s Java development strategies, most development teams are either in, about to in, or designed to be in a microservice architecture (80% based on our survey). For that fact, and because Spring Boot has well-designed major features to support and leverage a microservice architecture, Spring Boot has become such a major part of the enterprise Java eco-system and is showing no major signs of decline.

--

--