What is Spring Boot used for?

What is Spring Boot used for

Spring Boot is an open-source Java-based framework developed by Pivotal Team. It is commonly used for creating micro-services. It is also used to create stand-alone and production-ready Spring applications.

Building any applications using Java requires a lot of configurations. For example, the Spring MVC framework requires a lot of details in its configuration file. In such projects, if the developer use Maven build tool, just for configuring web components, she/he will have to configure 10s of dependencies in the pom.xml. There is no need for such hassles in Spring Boot.

Table of Contents

What is a microservice?

Microservice is a software architecture where an application has its service provided by a collection independently existing smaller services.

This type of architecture makes an application or software highly maintainable and easy to test. It makes an application loosely coupled, and independently deployable.

For example, in a Customer-Relation Management(CRM) application, it will have its user management services running on port 8080. Customer services running on port 8081. Sales services on port 8082, etc (independently deployable).

If you look into the example given above you will see that even if one service fails, others will run independently. In this type of architecture, the application’s administrator or developer will be easily able to see and fix what went wrong(highly maintainable, easily testable).

If one service fails, others will be running without the application completely down. One service need not depend on another to keep it running(loosely coupled).

What is the use of Spring Boot?

With the understanding of microservices and what really is Spring Boot, it is easily understandable what is the use of Spring Boot.

Listing the uses of Spring Boot framework (in short):

  1. Build easily deployable applications
  2. Develop easily scalable applications
  3. Build production-ready microservices
  4. Minimize development time
  5. Easy configuration of the development architecture

How to create a Spring Boot Project

The easiest and the most popularly used method to create a Spring Boot project is by using Spring Initializr.

Visit the Spring Initializr’s site. Select a project build tool, programming language, Spring Boot version and enter project meta-data. Then, add all the dependencies you require for your project.

Spring Initializr
Spring Initializr

Run the Spring Boot application

Using IDEs, running a Spring Boot application is easy. For running the Spring Boot application using Eclipse IDE, open the main application file, and run it as Java Application.

There are several other ways to run a spring boot application. For an extensive list of ways to run a spring boot application, refer this link.

Leave a Reply

Discover more from BHUTAN IO

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top