Understanding Spring Boot

Spring Boot is a framework, spring-boot-starter-web is one of the packages that comes with it, a jar file.

Just like JDK is a library, and util is one of the packages included in the JDK.


There are lots of these different 'starter' poms for spring boot. Each one of them tells maven to bring in the dependencies needed for that particular functionality. So spring-boot-starter-web brings in all the stuff needed for MVC and autoconfigures it with sensible defaults. The real trick to spring boot is it when it autoconfigures things it uses a whole of @ConditionalOnClass or other such annotations that look at what dependencies are on the classpath and provides configuration for those dependencies. What this means is when you have that spring boot actuator starter, when it's doing its autoconfiguration it will look at what other spring boot start poms you have in your pom.xml and it will configure different endpoints for the actuator so you can see the various metrics the actuator provides for that particular module.


From: https://docs.spring.io

Spring Boot provides a number of “Starters” that auto-configures your application adds jars to your classpath. The spring-boot-starter-parent is a core starter that provides useful maven defaults. It also provides a dependency-management section so that if you import additional starters then you can omit version tags for “blessed” dependencies. Therefore you should only need to specify the Spring Boot version number on this dependency

Starters are a set of convenient dependency descriptors that you can include in your application considering each starter covers a specific area.The starters contain a lot of the dependencies that you need to get a project up and running quickly and with a consistent, supported set of managed transitive dependencies.For example, if you want to get started using Spring and JPA for database access, just include the "spring-boot-starter-data-jpa" dependency in your project, and you are good to go. Spring Boot spring-boot-starter-web is starter for building web, including RESTful, applications using Spring MVC. It uses Tomcat as the default embedded container

Spring Boot has different groups of starters like

1-Spring Boot application starters: spring-boot-starter-web , spring-boot-starter-jdbc , spring-boot-starter-jpa etc

2-Spring Boot production starters : spring-boot-starter-actuator which provides production ready features to help you monitor and manage your application

3-Spring Boot technical starters: spring-boot-starter-jetty , spring-boot-starter-tomcat these starters can be used to exclude or swap specific technical facets