Home/Learn/Spring Boot/Spring Boot Starters

Spring Boot Starters

Beginner
Core & Setup

Starters are curated dependency descriptors (e.g. spring-boot-starter-web) that bundle all required libraries for a feature, removing version-conflict headaches.

Overview

Spring Boot Starters are pre-packaged, opinionated dependency groups. Each starter pulls in a coherent set of libraries with compatible versions, managed via the spring-boot-dependencies BOM (Bill of Materials). Instead of adding jackson-databind, tomcat-embed-core, spring-web, spring-webmvc, and hibernate-validator individually, you simply add spring-boot-starter-web and Spring Boot handles transitive dependencies and version alignment. You can override any managed version in your own pom.xml/build.gradle.

Common Starters

Starters follow the naming convention spring-boot-starter-{feature}. Third-party integrations use {name}-spring-boot-starter. Each starter activates relevant auto-configuration classes through the classpath condition mechanism.

XML — common Spring Boot starters
<!-- pom.xml — common starters -->
<dependencies>
  <!-- Web: Spring MVC, Tomcat, Jackson, Hibernate Validator -->
  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
  </dependency>

  <!-- JPA: Hibernate, Spring Data JPA, HikariCP -->
  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>
  </dependency>

  <!-- Security: Spring Security core + web -->
  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-security</artifactId>
  </dependency>

  <!-- Actuator: health, metrics, info endpoints -->
  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
  </dependency>

  <!-- Test: JUnit 5, Mockito, AssertJ, MockMvc, Testcontainers -->
  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-test</artifactId>
    <scope>test</scope>
  </dependency>
</dependencies>

Switching the Embedded Server

spring-boot-starter-web pulls in Tomcat by default. Exclude it and add the Jetty or Undertow starter to swap the server without changing application code.

XML — swapping embedded server
<!-- Swap Tomcat for Undertow — zero code changes needed -->
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-web</artifactId>
  <exclusions>
    <exclusion>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-tomcat</artifactId>
    </exclusion>
  </exclusions>
</dependency>

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-undertow</artifactId>
</dependency>

<!-- Reactive web stack — Netty instead of Tomcat -->
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-webflux</artifactId>
  <!-- Pulls in Reactor Netty as the embedded server -->
</dependency>

Overriding Managed Versions

Spring Boot manages library versions via its BOM. Override any version by setting the corresponding Maven property. In Gradle, use ext[] properties or a platform constraint.

XML + Gradle — overriding managed versions
<!-- Override Jackson version (Maven) -->
<properties>
  <jackson.version>2.17.1</jackson.version>
</properties>

<!-- Override in Gradle -->
// build.gradle
ext['jackson.version'] = '2.17.1'

// Or with Gradle version catalog + BOM platform:
dependencies {
    implementation platform("org.springframework.boot:spring-boot-dependencies:${bootVersion}")
    implementation('com.fasterxml.jackson.core:jackson-databind') {
        version { strictly '2.17.1' }
    }
}

// Check what version a starter brings in
./mvnw dependency:tree -Dincludes=com.fasterxml.jackson.core

// Third-party starter example (not from Spring team)
// Convention: {third-party}-spring-boot-starter
implementation 'org.flywaydb:flyway-spring-boot-starter:10.x'
implementation 'io.micrometer:micrometer-registry-prometheus'

Key Points to Remember

  • 1Starters are curated dependency bundles — one starter replaces many individual dependencies.
  • 2spring-boot-dependencies BOM manages all library versions; override via Maven properties.
  • 3Naming convention: spring-boot-starter-{feature} (official) or {name}-spring-boot-starter (third-party).
  • 4Exclude an auto-included transitive dep (e.g. Tomcat) by adding <exclusions> on the starter.
  • 5spring-boot-starter-web = Tomcat; swap to spring-boot-starter-undertow or spring-boot-starter-webflux.
  • 6spring-boot-starter-test brings JUnit 5, Mockito, AssertJ, MockMvc, and Testcontainers.

Interview Questions

Sign in to ask Aria
1

What is a Spring Boot starter and why is it useful?

EasyInfosys
2

How does Spring Boot manage dependency versions without version conflicts?

MediumAmazon
3

How would you switch from Tomcat to Undertow in Spring Boot?

MediumTCS
4

What does spring-boot-starter-test include?

EasyWipro
5

How do you override a dependency version managed by the Spring Boot BOM?

MediumNetflix

Ask Aria about Spring Boot Starters

Your personal AI tutor — ask anything about this concept

Revision Status

Personal Notes

Sign in to save personal notes for this topic.

Discussion

Sign in to join the discussion.

Loading discussion…