Skip to content
Ameen Abozaid
In reviewJNR-002-L04

BOMs

  • Lesson 4 of 8
  • 11 min read
  • Junior
On This Lesson 4 topics

The content for this lesson is written and waiting for review. The outline below shows what it covers. It will be published once it is approved.

In this lesson

align many versions with one import.

Planned topics

  • A BOM (bill of materials) is a POM that lists tested, matching versions.
  • You import it in dependencyManagement with scope import and type pom.
  • Then you add dependencies without versions.
  • Spring Boot uses a BOM so hundreds of libraries match each other.
  • Update one version number, and the whole set moves together.
Draft outline details

Demonstration

xml
<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-dependencies</artifactId>
      <version>${boot.version}</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

Check your understanding

Why does Spring Boot use a BOM?

Show answer

So all its libraries use versions tested together.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.