Spring Boot - Introduction

“Spring Boot is the extension of Spring framework including all the features of Spring. Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". Spring Boot is becoming favorite of developers nowadays, because of it’s a rapid production-ready environment which enables the developers to directly focus on the logic instead of struggling with the configuration and set up in very less time.
It is mostly used to create Micro-Services. ”

1. Why Spring Boot is evolved?

Spring makes programming Java quicker, easier, and safer for everybody. Spring's focus on speed, simplicity, and productivity has made it the world's most popular Java framework. It's MVC architecture that is a widely used module of spring, used to create scalable web applications.
 
But the most stumbling block of the spring projects is the configuration that takes a lot of time and concentration to focus on. Making the application ready for production takes some time if you are new to the spring.
To counter this problem Spring Boot is evolved.

2. Goals of Spring Boot 

Spring Boot is designed with the following goals −

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

3. Features of Spring Boot

You can choose Spring Boot because of the features and benefits it offers as given here −

  • It provides a flexible way to configure Java Beans, XML configurations, and Database Transactions.

  • It provides powerful batch processing and manages REST endpoints.

  • In Spring Boot, everything is auto-configured; no manual configurations are needed.

  • It offers an annotation-based spring application

  • Eases dependency management

  • It includes Embedded Servlet Container

4. Advantages of Spring Boot

  • Easy to understand and develop applications
  • Increases productivity
  • Reduces the development time
  • Simplified & version conflict-free dependency management through the starter POMs.
  • Spring Boot provides HTTP endpoints to access application internals like detailed metrics, application inner working, health status, etc.
  • No XML based configurations at all. Very much simplified properties. The beans are initialized, configured, and wired automatically.
  • The Spring Initializer provides a project generator to make you productive with the certain technology stack from the beginning. You can create a skeleton project with web, data access (relational and NoSQL datastores), cloud, or messaging support.

5. Spring Boot Disadvantages

  1. Spring boot may unnecessarily increase the deployment binary size with unused dependencies.
  2. If you are a control freak, I doubt Spring Boot would fit your needs.
  3. Spring Boot sticks well with microservices. The Spring Boot artifacts can be deployed directly into Docker containers. In large and monolithic based applications, I would not encourage you to use Spring Boot.

6. Components of Spring Boot

The whole application logic revolves around its components. There are three main components of Spring Boot :

  1. Controller
    It is responsible to handle user request and return appropriate response.
  2. Service 
    Here we implement the business logic of the application
  3. Repository
    Here we write the logics to perform datbase transaction on data ( save, updadate and retrieve)

 

Click next to have look at the prerequisites to getting started. 



×