Let’s start with Spring Boot…
It is developed by Pivotal Team. Spring Boot is an open-source Java-based framework, with the use of this framework it is easy to create stand-alone spring applications which are ready to run. Also, the Spring Boot framework mainly used to create a Micro Service because it consists of a comprehensive infrastructure that supports built microservice.It is a Spring module that provides the Rapid Application Development feature to the Spring framework.
Java, Spring, Maven, Gradle, and RESTful Web Service will be an added advantage.
Micro Service Architecture
It structures an application as a collection of services that are.Basically developers can develop and deploy services independently.These are highly maintainable and testable.Also Loosely coupled and independently deployable.
Examples for Micro Service architecture are, Uber,Netflix and Amazon etc.
- Provides Opinionated Development approach
- Reduce development, unit test, and integration test time.
- Avoids defining more Annotation Configuration
- Avoids writing lots of import statements
- Avoids XML Configuration.
Spring Boot Features
When you are using Spring Boot you can get started with minimum configurations without the need for an entire Spring configuration setup.
- Batch processing and manages REST endpoints.
- Auto configured
- Annotation-based spring application
- Eases dependency management
- Embedded Servlet Container
Spring Boot allows to use dependencies that are not going to be used in the application and these dependencies increase the size of the application.
Spring Boot Annotations
@EnableAutoConfiguration — Automatically configures your application based on the dependencies you have added
@ComponentScan — Automatically scans all the components included in the project.
The entry point of the Spring Boot Application is the class contains @SpringBootApplication annotation.It includes Auto- Configuration, Component Scan, and Spring Boot Configuration.So when you are using this annotation there is no need @EnableAutoConfiguration.@ComponentScan and @SpringBootConfiguration annotation since @SpringBootApplication annotation includes all other annotations.