Spring Boot Starter is one of the first things that tends to confuse newcomers. You might have wondered, “What is a Starter? Is it some magic box that bundles everything I need?” You’re half right! Spring Boot Starter is a very convenient mechanism that bundles together the dependencies needed for a specific feature. Let’s go through what it actually is and how to use it, step by step.

Note that this article assumes Spring Boot 3.x (3.2 or later recommended). The Starter name change introduced in Spring Boot 4.x is covered later in the article, in “Target version of this article and the Starter name change.”

What Is a Spring Boot Starter

A Spring Boot Starter exists to simplify the dependency declarations used in build tools like Maven and Gradle.

For example, when building a web application, you would normally need to individually list many dependencies in pom.xml (Maven) or build.gradle (Gradle) — the Spring Web module, Servlet API, JSP, and so on. As a project grows, managing these becomes cumbersome, and issues like version mismatches and dependency conflicts become more likely.

This is where Starters like spring-boot-starter-web come in. A Starter doesn’t refer to a specific library — it’s “a collection of libraries commonly used together in Spring Boot applications.” By simply adding spring-boot-starter-web as a dependency, you pull in everything needed for Spring Web into your project.

Adding a Dependency Using a Spring Boot Starter

For example, in a Maven project, you would write the following in pom.xml:

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

The same applies when using Gradle — write the following in build.gradle:

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-web'
}

With just this, the major libraries needed for a web application — Spring MVC, Jackson (JSON processing), Tomcat (embedded server), and more — are automatically added.

Types of Spring Boot Starters

There is a wide variety of Starters available, covering functionality such as database access (spring-boot-starter-data-jpa, etc.), security (spring-boot-starter-security), testing (spring-boot-starter-test), and more. In addition to the official Spring Boot Starters, there are also community-made Starters (you should verify whether a given Starter is trustworthy).

Using Spring Initializr (https://start.spring.io/), you can easily select the Starters you need and generate a project skeleton.

Practical Rules for Choosing Starters Without Regret

Adding too many Starters just because they’re convenient can increase startup time and configuration complexity. In practice, narrowing down your initial dependencies with the following rules keeps things stable:

  • Start with a minimal setup (e.g., web + actuator + test)
  • Add Starters later, once you actually know you need them
  • Separate Starters not needed in production (development-support ones) using profiles or dependency scopes
  • Rely on the Spring Boot BOM for version management rather than pinning versions individually

Not going “all-in from the start” is the shortest path to fewer problems.

Common Pitfalls

1. Assuming That Adding a Starter Means No Configuration Is Needed

A Starter is a mechanism for “assembling the libraries you need” — it doesn’t automatically configure things to match your business requirements. For example, once you add the Security Starter, you need to explicitly design your authorization rules and public endpoints.

What Happens When You Add spring-boot-starter-security

spring-boot-starter-security is a prime example of a Starter whose behavior changes dramatically just by adding it, so let’s look at it in a bit more detail.

implementation 'org.springframework.boot:spring-boot-starter-security'

Adding this single line and starting the app automatically triggers the following:

  • All endpoints require authentication (opening / in a browser redirects to a login form, and API clients receive a 401)
  • You can log in with the username user and a random password printed in the startup logs
  • CSRF protection and security headers (such as X-Content-Type-Options) are enabled

Many people are surprised when a screen that was working suddenly shows a login page — but this is expected behavior. In a real application, you need to define a SecurityFilterChain bean to explicitly design which paths are public and which require authentication.

How to write authorization rules with a minimal setup, and how to fix the username and password in application.properties, are covered in Steps to Implement Basic Authentication with Spring Security.

2. Leaving Dependency Conflicts Unresolved Until the Cause Becomes Invisible

If you keep manually overriding versions, the app can suddenly stop starting one day. When something feels off with your dependencies, visualize them early with mvn dependency:tree or ./gradlew dependencies.

3. Adopting Overlapping Starters of the Same Kind

For example, unintentionally mixing spring-boot-starter-web and spring-boot-starter-webflux can make your design direction inconsistent. It’s important to decide up front whether you’re going with synchronous MVC or reactive.

If You’re Not Sure What to Add First

For learning purposes or small APIs, the following is enough to start:

  • spring-boot-starter-web
  • spring-boot-starter-validation
  • spring-boot-starter-test

Add spring-boot-starter-data-jpa only when you need a database, and add spring-boot-starter-security once authentication becomes necessary — this kind of incremental approach is easier to manage.

Here are some follow-up articles on how to actually use each Starter:

Quick Reference for Commonly Used Starters

Here’s a summary of the Starters that typically come up first, organized by use case. To make it easy to check exactly what gets included, the main bundled libraries are also listed. The groupId is org.springframework.boot in every case, so the coordinates take the form org.springframework.boot:<artifactId>. Versions are managed by the Spring Boot BOM, so you don’t need to specify them individually.

Use CaseStarter (artifactId)Main Bundled Libraries
Foundation for all Startersspring-boot-starterspring-boot, spring-boot-autoconfigure, spring-boot-starter-logging (Logback), snakeyaml, jakarta.annotation-api
REST APIspring-boot-starter-webspring-boot-starter, spring-web, spring-webmvc, spring-boot-starter-json (Jackson), spring-boot-starter-tomcat
Reactive Webspring-boot-starter-webfluxspring-boot-starter, spring-webflux, spring-boot-starter-reactor-netty, spring-boot-starter-json
Input Validationspring-boot-starter-validationspring-boot-starter, hibernate-validator, tomcat-embed-el
RDB Accessspring-boot-starter-data-jpaspring-boot-starter-jdbc (HikariCP), hibernate-core, spring-data-jpa, spring-boot-starter-aop
Authentication/Authorizationspring-boot-starter-securityspring-boot-starter, spring-security-config, spring-security-web, spring-aop
Monitoring/Health Checksspring-boot-starter-actuatorspring-boot-starter, spring-boot-actuator-autoconfigure, micrometer-observation, micrometer-core
Testingspring-boot-starter-testspring-boot-test, spring-test, JUnit Jupiter, Mockito, AssertJ, Hamcrest, JSONassert, json-path

For example, when you add spring-boot-starter-web, the foundational spring-boot-starter is pulled in along with it internally. Because of this, you rarely need to declare the foundational Starter explicitly on its own.

The exact list of bundled libraries varies depending on the Spring Boot version, so if you’re unsure, refer to the official reference’s list of Starters. Also, for which situations reactive web (WebFlux) is well-suited for, see Introduction to Spring Boot WebFlux.

What’s the Difference Between a Starter and AutoConfiguration?

One thing beginners often confuse is the relationship between a Starter and AutoConfiguration. Their roles are clearly separated:

  • Starter: “A set of dependencies bundling together the libraries you need.” It contains almost no code itself — its job is to shorten what you write in pom.xml / build.gradle.
  • AutoConfiguration: “A mechanism that looks at the libraries on the classpath and automatically registers beans.” This is handled by spring-boot-autoconfigure, and is activated based on conditions such as @ConditionalOnClass.

When you add spring-boot-starter-web, Tomcat and Spring MVC land on the classpath, and AutoConfiguration detects this and automatically configures things like DispatcherServlet and the embedded Tomcat server — it’s a two-stage process. The details of this mechanism are explained in How Spring Boot’s AutoConfiguration Mechanism Works.

What If You Want to Use Jetty or Undertow Instead of Tomcat?

spring-boot-starter-web includes Tomcat as its embedded server. If you want to swap in a different server, exclude the Tomcat Starter and add an alternative Starter instead.

For Maven:

<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-jetty</artifactId>
</dependency>

For Gradle:

dependencies {
    implementation('org.springframework.boot:spring-boot-starter-web') {
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat'
    }
    implementation 'org.springframework.boot:spring-boot-starter-jetty'
}

Since “a Starter is just a bundle,” you can exclude part of it and swap it out like this.

Why Don’t You Need to Specify a Version?

The reason Starter declarations don’t include a version is that spring-boot-starter-parent (Maven) or Spring Boot’s Gradle plugin manages compatible versions collectively through a BOM (Bill of Materials). Once you decide on a single Spring Boot version, compatible combinations of Spring Framework, Hibernate, Jackson, Tomcat, and so on are automatically selected for you — all pre-verified.

Overriding versions individually tends to break this consistency and can cause startup errors. “Leave versioning to the BOM” is the basic rule.

Target Version of This Article and the Starter Name Change

If you’re migrating from 2.x to 3.x, there are breaking changes such as the mandatory move to Java 17 and the javax → jakarta package rename, so see the Spring Boot 2.x to 3.x Migration Guide.

In Spring Boot 4.x, due to module reorganization, a new Starter named spring-boot-starter-webmvc was introduced for Web MVC. Here’s how it relates to spring-boot-starter-web, which this article has been discussing:

  • If you’re using the 3.x series, spring-boot-starter-web alone continues to work fine as before.
  • If you’re migrating to the 4.x series, check the release notes for the version you’re adopting to see whether spring-boot-starter-web is still provided, or whether you need to switch to spring-boot-starter-webmvc.
  • Regardless of which name is used, the role itself — “a Starter that bundles the dependencies needed for Web MVC” — remains unchanged.

It’s a good idea to first check which major version you’re using, then choose the corresponding Starter name. The core idea covered in this article — that “a Starter is something that bundles dependencies together” — stays the same regardless of version.

Practical Commands for Checking Dependencies

To understand “why is this library included,” checking the dependency tree is helpful.

Maven

./mvnw dependency:tree

Gradle

./gradlew dependencies

When dependencies start to grow bloated, simply trimming unnecessary Starters can sometimes improve startup speed and maintainability.

Summary

As shown here, Spring Boot Starter is a powerful tool for simplifying dependency management and improving development efficiency. Understanding Starters is essential when learning Spring Boot. Try out various Starters for yourself and experience their convenience firsthand!

Next Steps

Once you understand how Starters work, the following articles will help you see the “behind the scenes” of Spring Boot: