Spring Boot - Introduction
Why Spring Boot is evolved?
Spring Bootis evolved.
“Spring Boot is the extention 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 nowdays, 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 Microservices. ”
Table of Contents
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
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
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.
Spring Boot Disadvantages
- Spring boot may unnecessarily increase the deployment binary size with unused dependencies.
- If you are a control freak, I doubt Spring Boot would fit your needs.
- 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.
Components of Spring Boot
The whole application logic revolves around its components. There are three main components of Spring Boot :
It is responsible to handle user request and return appropriate response.
Here we implement the business logic of the application
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.