Starter Dependencies
Master Spring Boot Starters — the curated dependency bundles that eliminate version conflicts and bring everything you need for a feature with a single dependency.
Last reviewed: January 2025
🔍 What Is It?
Spring Boot Starters are curated dependency descriptors — POMs that declare a set of related dependencies that work well together.
Most important starters:
- →
spring-boot-starter— core: logging, auto-config, Spring core - →
spring-boot-starter-web— Spring MVC, Tomcat, Jackson, validation - →
spring-boot-starter-data-jpa— Hibernate, Spring Data JPA, JDBC - →
spring-boot-starter-security— Spring Security - →
spring-boot-starter-test— JUnit 5, Mockito, AssertJ, MockMvc - →
spring-boot-starter-actuator— health, metrics, management endpoints - →
spring-boot-starter-validation— Hibernate Validator, Jakarta Validation - →
spring-boot-starter-cache— Spring Cache abstraction - →
spring-boot-starter-data-redis— Lettuce Redis client, Spring Data Redis - →
spring-boot-starter-amqp— RabbitMQ, Spring AMQP - →
spring-boot-starter-kafka— Apache Kafka, Spring Kafka - →
spring-boot-starter-mail— JavaMail, Spring Mail - →
spring-boot-starter-webflux— Spring WebFlux, Reactor (reactive)
Parent POM:
spring-boot-starter-parent manages all dependency versions — you never specify versions for Spring Boot managed dependencies.
🎯 Why Do We Need It?
Before starters, adding JPA to a Spring project meant:
- Find the right Hibernate version
- Find the Spring ORM version compatible with it
- Find the Spring Data JPA version compatible with Spring ORM
- Find the connection pool version that works
- Resolve the 15 transitive dependency conflicts
- Discover at runtime that two versions are incompatible
Starters eliminate all of this. The Spring Boot team tests all combinations and releases them as a BOM (Bill of Materials). You get one version number (the Boot version) and everything works together.
🏗️ What Happens in Real Projects?
In a typical enterprise microservice, you'll use 6-10 starters:
<!-- The essentials for a REST API with database -->
spring-boot-starter-web → REST endpoints
spring-boot-starter-data-jpa → database access
spring-boot-starter-security → authentication
spring-boot-starter-validation → request validation
spring-boot-starter-actuator → health checks for Kubernetes
spring-boot-starter-test → all testing dependenciesFor event-driven microservices, add:
spring-boot-starter-kafka → Kafka consumer/producer
spring-boot-starter-data-redis → Redis for caching/session⚙️ How It Works
Dependency resolution:
- You add
spring-boot-starter-webto your POM - Maven/Gradle resolves its dependencies: spring-webmvc, spring-web, tomcat-embed-core, jackson-databind, etc.
- Versions come from
spring-boot-dependenciesBOM (imported by starter-parent) - No version conflicts because all versions are pre-tested together
spring-boot-starter-parent:
- →Inherits from
spring-boot-dependenciesBOM - →Manages 300+ dependency versions
- →Configures Maven plugins (compiler, surefire, failsafe)
- →Sets Java source encoding to UTF-8
- →Enables resource filtering for application.properties
💻 Example
Starter Dependencies in Practice — How to use starters and customize their transitive dependencies.
🤔 Common Confusions
❓ Do I need to specify versions for starter dependencies?
No — if you use spring-boot-starter-parent as your parent POM, all Spring Boot managed dependencies have their versions controlled by the BOM. Only specify versions for dependencies NOT managed by Spring Boot (e.g., your company's internal libraries).
❓ What is the difference between spring-boot-starter and spring-boot-starter-web?
spring-boot-starter is the base starter (logging, auto-config, Spring core). spring-boot-starter-web extends it with Spring MVC, Tomcat, and Jackson. Most web apps use spring-boot-starter-web which transitively includes the base starter.
❓ Should I use spring-boot-starter-web or spring-boot-starter-webflux?
Use spring-boot-starter-web (servlet-based) for standard REST APIs — it's simpler, well-understood, and works with all JPA/JDBC libraries. Use spring-boot-starter-webflux (reactive) only if you need non-blocking I/O for very high concurrency or are building reactive pipelines. Don't mix them in the same app.
🚨 Common Production Issues
Dependency version override conflicts — if you override a managed version, ensure it's compatible with all other managed deps
spring-boot-starter-test pulling in outdated JUnit 4 — it includes JUnit 5 by default; JUnit 4 is vintage and optional
Classpath scanning slowed by too many jars — use spring-context-indexer to pre-compute component index
Fat JAR size bloat — audit with mvn dependency:tree and exclude unused transitive dependencies
✅ Best Practices
Always use spring-boot-starter-parent to get managed dependency versions
Never manually specify versions for Spring-managed dependencies
Use mvn dependency:tree to understand what a starter brings in
Exclude embedded Tomcat if deploying to an external container
Add spring-boot-starter-actuator to every production service for health checks
Use spring-boot-starter-test in test scope — it includes JUnit 5, Mockito, AssertJ
🏛️ Architect's Note
When building internal platform libraries for your organization, package them as custom Spring Boot starters. Name them {company}-{feature}-spring-boot-starter. This pattern means application teams add one dependency and get a fully configured, production-ready feature. This is how companies build internal SDKs for observability, security, audit logging, and feature flags — all as Spring Boot starters.
💬 Frequently Asked Questions
🎯 Key Takeaways
🔗 Related Topics
🎯 Practice this topic in interviews
↗ Where this topic fits
Spring Boot Technology Guide
Return to the Spring Boot learning hub.
Backend Engineer Career Path
A structured journey through Core Java, Spring Boot, production backend engineering, and interview preparation.
Full Stack Java Developer Career Path
A guided route through frontend foundations, Java backend engineering, delivery workflows, and interview readiness.
Sources
Sources / References
Use these Spring Boot references to verify the concept in official docs and continue into the most relevant SplashRide pages.
Official documentation
Related SplashRide pages
SplashRide Spring Boot learning path
Browse the full Spring Boot topic collection and learning order on SplashRide.
Spring Boot Interview Prep
Practice Spring Boot interview questions and scenario-based answers.
Backend Engineer Career Path
A structured journey through Core Java, Spring Boot, production backend engineering, and interview preparation.
Full Stack Java Developer Career Path
A guided route through frontend foundations, Java backend engineering, delivery workflows, and interview readiness.
Spring Boot Introduction
Understand what Spring Boot is, why it exists, and how it transforms enterprise Java development by eliminating boilerplate configuration.
Auto Configuration
Understand how Spring Boot's auto-configuration works under the hood — how it detects your classpath, applies conditional configuration, and how to customize or disable it.