Skip to the workspace
Pebellslearn by building
Spring Boot Starters  ›  Lesson

The Starters You Will Use Most

Spring Boot Starters 12 minA handful of starters, such as web, validation, data-jpa, security, actuator and test, cover most services, so reading them reveals what an app does.

spring boot / The Starters You Will Use Most

Explore each scene at your own pace.

01 · The rule

The rule

The Starters You Will Use Most

A new Spring Boot project on start.spring.io offers well over a hundred dependencies to tick. Most services use the same handful. Knowing those few by heart, and what each one switches on, lets you read any project's build file and guess its architecture in seconds.

The rule

Read a build file's starters and you know what the app does.

Here is library-service's pom.xml, trimmed to its starters:

<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency>
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-validation</artifactId></dependency>
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-jpa</artifactId></dependency>
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-security</artifactId></dependency>
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency>
<dependency><groupId>org.postgresql</groupId><artifactId>postgresql</artifactId><scope>runtime</scope></dependency>
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency>
Starter What it switches on
web Spring MVC, Jackson, embedded Tomcat: blocking REST APIs
webflux Reactive web on Netty: non-blocking APIs
validation Bean Validation annotations such as @NotBlank and @Email
data-jpa Spring Data repositories plus Hibernate, talking to a SQL database
data-jdbc / jdbc Simpler SQL access without a full ORM
data-mongodb Repositories for MongoDB documents
security The security filter chain, locked down by default
oauth2-resource-server Accepting and checking bearer tokens
actuator Health, metrics and other production endpoints
test JUnit 5, Mockito, AssertJ and Spring's test support

Notice that a starter such as data-jpa does not include a database driver. You add the driver for your database (postgresql above), usually with runtime scope because your code never calls it directly.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.