Spring Boot Starters

Pre-configured dependency bundles

← Back to Index

What are Starters?

Starters are dependency descriptors that bundle common dependencies with compatible versions.

Instead of manually adding 10+ dependencies for web development, just add spring-boot-starter-web!

Common Starters

Starter What It Includes
spring-boot-starter-web Spring MVC, embedded Tomcat, Jackson JSON
spring-boot-starter-data-jpa Spring Data JPA, Hibernate, JDBC
spring-boot-starter-security Spring Security, authentication filters
spring-boot-starter-validation Bean Validation (Hibernate Validator)
spring-boot-starter-test JUnit 5, Mockito, AssertJ, Spring Test
spring-boot-starter-actuator Health checks, metrics, monitoring
spring-boot-starter-mail Java Mail API, Spring mail support
spring-boot-starter-cache Spring Cache abstraction
spring-boot-starter-webflux Reactive web with Spring WebFlux

Usage Example

<!-- pom.xml -->
<dependencies>
    <!-- Web application -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <!-- Database access -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>

    <!-- Security -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-security</artifactId>
    </dependency>

    <!-- Testing -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
</dependencies>

How Starters Work

// When you add spring-boot-starter-web:

// 1. Dependencies included:
//    - spring-web
//    - spring-webmvc
//    - spring-boot-starter-tomcat
//    - jackson-databind
//    - spring-boot-starter (logging, etc.)

// 2. Auto-configuration enabled:
//    - DispatcherServlet configured
//    - Embedded Tomcat started
//    - JSON serialization configured
//    - Error handling configured

Summary

  • Starters: Curated dependency bundles
  • Version management: Compatible versions guaranteed
  • Auto-configuration: Enabled by starter dependencies
  • No version needed: Parent POM manages versions
  • Convention: spring-boot-starter-{feature}