Starters and the parent POM
Understand how one starter dependency pulls a whole, version-aligned stack.
Open this lesson in the learning hubKey points
- A starter is an empty jar whose only job is to drag in a curated set of dependencies.
spring-boot-starter-webgives you Spring MVC, Jackson and an embedded Tomcat in one line.- The parent POM pins versions. You write dependencies without a
<version>tag and they stay compatible. - Validation is not in the web starter. Add
spring-boot-starter-validationif you use@Valid. - Start a project from
start.spring.iorather than hand-writing the POM.
Example
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.5.0</version>
</parent>
<properties>
<java.version>21</java.version>
</properties>
<dependencies>
<!-- MVC + Jackson + embedded Tomcat -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Bean Validation: needed for @Valid -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
One starter, zero version numbers, a stack that is guaranteed to fit together.
This is a reading copy. The full lesson — with the visual explainer, the interactive lab and a Run button for the code — lives in the Spring Boot course, and every lesson in it is listed on the Spring Boot contents page.