Skip to the workspace
Pebellslearn by building
Spring Boot Starters  ›  Capstone Project

Starter Versions and the Boot BOM

Spring Boot Starters 12 minThe Spring Boot version imports a bill of materials that fixes compatible versions for every managed library, so starters need no versions of their own.

spring boot / Starter Versions and the Boot BOM

Explore each scene at your own pace.

01 · The rule

The rule

Starter Versions and the Boot BOM

You may have noticed that none of library-service's starters has a version number. That is not an oversight. Spring Boot manages the versions of hundreds of libraries for you, and the one number you do choose, the Boot version itself, decides all the others.

The rule

Choose one Boot version; it chooses every other version for you.

Every Boot release publishes a bill of materials (BOM), spring-boot-dependencies, a long list of libraries with versions that were tested together. Your build imports it in one of two ways.

With Maven, the usual way is to inherit from the Boot parent:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.5.6</version>
</parent>

With Gradle, apply the Boot plugin together with the dependency-management plugin:

plugins {
    id 'org.springframework.boot' version '3.5.6'
    id 'io.spring.dependency-management' version '1.1.7'
}

From then on, spring-boot-starter-web gets the matching Spring Framework, Jackson and Tomcat versions, and a plain driver such as postgresql gets its tested version too, as long as it appears in the BOM.

Spring Boot 3 has two baseline facts worth remembering: it needs Java 17 or newer, and it uses the Jakarta EE namespace, so imports read jakarta.persistence.Entity and jakarta.validation.constraints.NotBlank, not the old javax.*. A library built for Boot 2 that still uses javax.* will not work with Boot 3.

When you really must change one managed version, for example to pick up a security fix before the next Boot release, override its version property instead of hard-coding the dependency:

<properties>
    <jackson-bom.version>2.19.2</jackson-bom.version>
</properties>
Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.