Spring Boot の starter とは、ある用途に必要なライブラリ一式をまとめて呼び込むための依存関係(spring-boot-starter-*)です。 たとえば spring-boot-starter-webmvc を1行足すと、Spring MVC と組み込み Tomcat がそろいます。Spring Boot 4 では starter が技術ごとに細かく分かれ、名前が変わったものや、テスト専用の -test starter が加わりました。

この記事では、用途別にそのまま貼れる pom.xml/build.gradle、公式一覧を日本語にした全件表、Boot 3 からの新旧対応表、選び方のフロー図をまとめます。

確認環境:Spring Boot 4.1.1 の公式リファレンスと Spring Boot 4.0 Migration Guide を 2026年10月7日に確認。pom.xml を調べるスクリプトは Python 3.11.15 で実行しています。

Spring Boot starterの早見表

やりたいことから、足す starter がすぐ分かる表です。名前は Spring Boot 4 のものです。

やりたいこと 足すstarter テスト用 Boot 3での名前
REST APIを作る spring-boot-starter-webmvc -webmvc-test -web
HTML画面を出す -webmvc と -thymeleaf -thymeleaf-test -web と -thymeleaf
入力値を検証する -validation -validation-test 同じ
DBをJPAで使う -data-jpa -data-jpa-test 同じ
DBにSQLで接続する -jdbc -jdbc-test 同じ
テーブル定義を管理する -flyway か -liquibase -flyway-test など —
ログインを付ける -security -security-test 同じ
トークンでAPIを守る -security-oauth2-resource-server 左に -test -oauth2-resource-server
外部APIを呼ぶ -restclient -restclient-test —
バッチ処理を作る -batch か -batch-jdbc -batch-test など —
稼働状況を見る -actuator -actuator-test 同じ
AOPを使う -aspectj -aspectj-test -aop

表の -webmvc などは spring-boot-starter-webmvc の省略です。「Boot 3での名前」は、Migration Guide に改名として載っているものだけを書き、それ以外は「同じ」または「—」としています。

本記事の内容は、ご自由にお使いください。
ご利用の際は、出典として本ページへのリンクを記載いただけますようお願いします。

(記載例)出典:株式会社RJC「Spring Boot starter一覧|用途別の選び方とBoot 4の新旧対応表」

starterの基本と名前の付け方

公式リファレンスでは、公式の starter はすべて spring-boot-starter-* という名前で、* の部分が用途を表すと説明されています。公式以外が作る starter は spring-boot で始めず、thirdpartyproject-spring-boot-starter のように自分の名前を先頭に置く決まりです。

Spring Boot 4 では、名前の付け方が次のようにそろいました(Migration Guide)。

種類 名前の形 例
モジュール spring-boot-<技術> spring-boot-webmvc
starter spring-boot-starter-<技術> spring-boot-starter-webmvc
テスト用starter spring-boot-starter-<技術>-test spring-boot-starter-webmvc-test
ルートパッケージ org.springframework.boot.<技術> —

技術ごとに starter があり、それぞれにテスト用の相棒(-test)が付く、と覚えると全体が見通せます。

バージョンは、Maven なら spring-boot-starter-parent を親にすると starter 側に書かずに済みます。

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>4.1.1</version>
    <relativePath/>
</parent>

用途別テンプレート|pom.xmlとbuild.gradle

6つの用途ごとに、<dependencies> の中へそのまま貼れる形で載せます。本体の starter と -test starter を対で入れるのが Boot 4 の基本形です。Migration Guide には「テスト用 starter はどれも spring-boot-starter-test を連れてくるので、これを自分で書く必要はなくなった」とあります。

1. REST APIを作る

pom.xml

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-webmvc</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-webmvc-test</artifactId>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-validation-test</artifactId>
    <scope>test</scope>
</dependency>

build.gradle

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-webmvc'
    implementation 'org.springframework.boot:spring-boot-starter-validation'

    testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
    testImplementation 'org.springframework.boot:spring-boot-starter-validation-test'
}

2. 画面つきのWebアプリを作る

pom.xml

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-webmvc</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-thymeleaf</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-webmvc-test</artifactId>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-thymeleaf-test</artifactId>
    <scope>test</scope>
</dependency>

build.gradle

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-webmvc'
    implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
    implementation 'org.springframework.boot:spring-boot-starter-validation'

    testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
    testImplementation 'org.springframework.boot:spring-boot-starter-thymeleaf-test'
}

テンプレートは src/main/resources/templates に置くと自動で読み込まれます(公式リファレンス Servlet Web Applications)。

3. データベースに接続する

pom.xml(JPA で使う場合。JDBC ドライバは使う DB のものに置き換えます)

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
    <groupId>org.postgresql</groupId>
    <artifactId>postgresql</artifactId>
    <scope>runtime</scope>
</dependency>

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa-test</artifactId>
    <scope>test</scope>
</dependency>

build.gradle

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
    runtimeOnly 'org.postgresql:postgresql'

    testImplementation 'org.springframework.boot:spring-boot-starter-data-jpa-test'
}

テーブル定義をマイグレーションで管理するなら spring-boot-starter-flyway(テスト用は -flyway-test)を足します。公式 How-to には「インメモリ型とファイル型の DB は spring-boot-starter-flyway で対応する」とあるので、それ以外の DB では Flyway 側の DB 別モジュールも合わせて追加します。マイグレーションの SQL は既定で classpath:db/migration に置き、ファイル名は V<バージョン>__<名前>.sql の形です。

4. 認証を付ける

pom.xml(ログインの基本と、トークンで API を保護する構成)

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-security-oauth2-resource-server</artifactId>
</dependency>

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-security-test</artifactId>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-security-oauth2-resource-server-test</artifactId>
    <scope>test</scope>
</dependency>

build.gradle

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-security'
    implementation 'org.springframework.boot:spring-boot-starter-security-oauth2-resource-server'

    testImplementation 'org.springframework.boot:spring-boot-starter-security-test'
    testImplementation 'org.springframework.boot:spring-boot-starter-security-oauth2-resource-server-test'
}

画面のログインだけなら -security の1つで始められます。外部の認可サーバーでログインさせるなら -security-oauth2-client、SAML2 なら -security-saml2 を選びます。

5. バッチ処理を作る

pom.xml

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-batch-jdbc</artifactId>
</dependency>
<dependency>
    <groupId>org.postgresql</groupId>
    <artifactId>postgresql</artifactId>
    <scope>runtime</scope>
</dependency>

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-batch-jdbc-test</artifactId>
    <scope>test</scope>
</dependency>

build.gradle

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-batch-jdbc'
    runtimeOnly 'org.postgresql:postgresql'

    testImplementation 'org.springframework.boot:spring-boot-starter-batch-jdbc-test'
}

Boot 4 の一覧には、Spring Batch だけの -batch、JDBC と組み合わせる -batch-jdbc、MongoDB と組み合わせる -batch-data-mongodb の3つがあります。DB と一緒に使うなら -batch-jdbc が合います。

6. 監視を付ける

pom.xml

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

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator-test</artifactId>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-opentelemetry-test</artifactId>
    <scope>test</scope>
</dependency>

build.gradle

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-actuator'
    implementation 'org.springframework.boot:spring-boot-starter-opentelemetry'

    testImplementation 'org.springframework.boot:spring-boot-starter-actuator-test'
    testImplementation 'org.springframework.boot:spring-boot-starter-opentelemetry-test'
}

稼働状況の確認だけなら -actuator の1つで足ります。-opentelemetry は Spring Boot 4.0 で加わった starter で、リリースノートでは「メトリクスとトレースを OTLP で送るために必要な依存関係をまとめて入れる」と説明されています。

やりたいことから選ぶフロー

flowchart TD
    A["作るものは?"] --> B{"HTTPで受ける?"}
    B -- "はい" --> C{"リアクティブで書く?"}
    C -- "いいえ" --> D["webmvc"]
    C -- "はい" --> E["webflux"]
    B -- "いいえ" --> F{"定期・一括の処理?"}
    F -- "はい" --> G["batch / batch-jdbc / quartz"]
    F -- "いいえ" --> H["spring-boot-starter のみ"]
    D --> I{"HTMLを返す?"}
    I -- "はい" --> J["thymeleaf を追加"]
    I -- "いいえ" --> K["validation を追加"]
    J --> L{"DBを使う?"}
    K --> L
    E --> L
    G --> L
    L -- "エンティティ中心" --> M["data-jpa"]
    L -- "SQLを自分で書く" --> N["jdbc"]
    L -- "使わない" --> O{"ログインや保護が要る?"}
    M --> O
    N --> O
    O -- "はい" --> P["security 系を追加"]
    O -- "いいえ" --> Q["actuator を検討"]
    P --> Q
    Q --> R["足した starter ごとに -test を追加"]

最初は少なく始めて、必要になった時点で1つずつ足すと、依存関係の見通しを保てます。

公式starterの全件一覧(日本語)

Spring Boot 4.1.1 の公式リファレンス「Build Systems」の Starters の表を、2026年10月7日に数えたところ、アプリケーション用 163 件、本番向け 1 件、技術用 6 件の計 170 件でした。このうち 75 件は、本体の starter と対になる -test starter です。

下の表は、本体側の 94 件を用途ごとに分け、日本語の説明を付けたものです。

  • 名前:spring-boot-starter- に続く部分。webmvc なら spring-boot-starter-webmvc
  • 主に入るもの:公式の説明文に書かれているライブラリ
  • -test:「あり」は spring-boot-starter-<名前>-test が一覧にあるもの
  • 備考:改名の情報(Migration Guide に記載があるもののみ)と種別

基本・共通

名前 用途 主に入るもの -test 備考
(接尾辞なし) 中心になるstarter。自動設定・ログ・YAML Spring Boot本体、ログ、YAML — spring-boot-starter そのもの
classic 移行用。自動設定を全部そろえた中心starter 全モジュール、ログ、YAML — Boot 3の spring-boot-starter 相当
test テストの土台 JUnit Jupiter、Hamcrest、Mockito — 各 -test starterから自動で入る
test-classic 移行用のテスト土台 JUnit Jupiter、Hamcrest、Mockito — Boot 3の starter-test 相当
aspectj AspectJによるAOP(横断処理) AspectJ あり 旧名 aop
validation 入力値の検証 Hibernate Validator あり —
cache キャッシュ Springのキャッシュ機能 あり —
cloudfoundry Cloud Foundry対応 Cloud Foundry連携 あり —
kotlinx-serialization-json KotlinのJSON変換 Kotlinx Serialization JSON あり —

Web(サーバー側)

名前 用途 主に入るもの -test 備考
webmvc REST API・画面つきWeb Spring MVC、Tomcat あり 旧名 web
webflux リアクティブなWeb WebFlux、Reactor Netty あり —
jersey JAX-RSでのREST JAX-RS、Jersey あり —
graphql GraphQL API Spring GraphQL あり —
hateoas ハイパーメディア型REST Spring HATEOAS、Spring MVC あり —
webservices SOAPなどのWebサービス Spring Web Services あり 旧名 web-services
websocket WebSocket通信 Spring MVCのWebSocket対応 あり —
grpc-server gRPCサーバー Spring gRPC(サーバー) あり —
grpc-client gRPCクライアント Spring gRPC(クライアント) あり —
data-rest リポジトリをRESTで公開 Spring Data REST、Spring MVC あり —
session-data-redis セッションをRedisに保存 Spring Session、Spring Data Redis あり —
session-jdbc セッションをDBに保存 Spring Session、JDBC あり —
web (非推奨)webmvc を使う Spring MVC、Tomcat — 新名 webmvc
web-services (非推奨)webservices を使う Spring Web Services — 新名 webservices

組み込みサーバー・HTTPクライアント

名前 用途 主に入るもの -test 備考
tomcat 組み込みTomcat Tomcat — —
jetty 組み込みJetty Jetty — —
reactor-netty Reactor Netty Reactor Netty — —
tomcat-runtime Tomcatの実行時部品 Tomcatランタイム — 技術starter
jetty-runtime Jettyの実行時部品 Jettyランタイム — 技術starter
restclient 同期型のHTTP呼び出し RestClient、RestTemplate、HTTP Service Client あり —
webclient リアクティブなHTTP呼び出し WebClient、HTTP Service Client あり —

画面テンプレート

名前 用途 主に入るもの -test 備考
thymeleaf HTML画面(Thymeleaf) Thymeleaf あり —
freemarker HTML画面(FreeMarker) FreeMarker あり —
mustache HTML画面(Mustache) Mustache あり —
groovy-templates HTML画面(Groovy Templates) Groovy Templates あり —

JSON

名前 用途 主に入るもの -test 備考
jackson JSON変換(Jackson) Jackson あり —
gson JSON変換(GSON) GSON あり —
jsonb JSON変換(JSON-B) JSON-B あり —
json JSONの読み書き JSON処理 — —

データベース(SQL・マイグレーション)

名前 用途 主に入るもの -test 備考
jdbc JDBCで直接SQLを書く JDBC、HikariCP あり —
data-jdbc 軽量なリポジトリ(Spring Data JDBC) Spring Data JDBC あり —
data-jpa エンティティ中心のDBアクセス Spring Data JPA、Hibernate あり —
jooq 型安全なSQL(jOOQ) jOOQ、JDBC あり —
r2dbc リアクティブなDB接続 R2DBC あり —
data-r2dbc リアクティブなリポジトリ Spring Data R2DBC あり —
flyway DBマイグレーション(Flyway) Flyway あり —
liquibase DBマイグレーション(Liquibase) Liquibase あり —

データストア(NoSQL・検索・LDAP)

名前 用途 主に入るもの -test 備考
data-redis Redis Spring Data Redis、Lettuce あり —
data-redis-reactive Redis(リアクティブ) Spring Data Redis reactive、Lettuce あり —
mongodb MongoDB(Spring Dataなし) MongoDB あり —
data-mongodb MongoDBのリポジトリ Spring Data MongoDB あり —
data-mongodb-reactive MongoDB(リアクティブ) Spring Data MongoDB Reactive あり —
cassandra Cassandra(Spring Dataなし) Cassandra あり —
data-cassandra Cassandraのリポジトリ Spring Data Cassandra あり —
data-cassandra-reactive Cassandra(リアクティブ) Spring Data Cassandra Reactive あり —
couchbase Couchbase(Spring Dataなし) Couchbase あり —
data-couchbase Couchbaseのリポジトリ Spring Data Couchbase あり —
data-couchbase-reactive Couchbase(リアクティブ) Spring Data Couchbase Reactive あり —
elasticsearch Elasticsearch(Spring Dataなし) Elasticsearch あり —
data-elasticsearch Elasticsearchのリポジトリ Spring Data Elasticsearch あり —
neo4j Neo4j(Spring Dataなし) Neo4j あり —
data-neo4j Neo4jのリポジトリ Spring Data Neo4j あり —
ldap LDAP LDAP あり —
data-ldap LDAPのリポジトリ Spring Data LDAP あり —
hazelcast Hazelcast Hazelcast あり —

セキュリティ

名前 用途 主に入るもの -test 備考
security ログイン・認可の基本 Spring Security あり —
security-oauth2-client OAuth2/OpenID Connectでログイン Spring SecurityのOAuth2クライアント機能 あり 旧名 oauth2-client
security-oauth2-resource-server トークンでAPIを保護 Spring SecurityのOAuth2リソースサーバー機能 あり 旧名 oauth2-resource-server
security-oauth2-authorization-server 認可サーバーを作る Spring Authorization Server あり 旧名 oauth2-authorization-server
security-saml2 SAML2でログイン Spring Security SAML2 あり —
oauth2-client (非推奨)新名を使う 同上 — 新名 security-oauth2-client
oauth2-resource-server (非推奨)新名を使う 同上 — 新名 security-oauth2-resource-server
oauth2-authorization-server (非推奨)新名を使う 同上 — 新名 security-oauth2-authorization-server

バッチ・スケジュール・メール

名前 用途 主に入るもの -test 備考
batch バッチ処理 Spring Batch あり —
batch-jdbc バッチ処理(JDBCと組み合わせる) Spring Batch、JDBC あり —
batch-data-mongodb バッチ処理(MongoDBを使う) Spring Batch、Data MongoDB あり —
quartz スケジュール実行 Quartz あり —
mail メール送信 Java Mail、Springのメール送信 あり —
sendgrid SendGridでメール送信 SendGrid あり —

メッセージング・連携

名前 用途 主に入るもの -test 備考
kafka Apache Kafka Apache Kafka あり —
amqp RabbitMQ Spring AMQP、RabbitMQ あり —
jms JMS JMS あり —
activemq ActiveMQ Apache ActiveMQ、JMS あり —
artemis Artemis Apache Artemis、JMS あり —
pulsar Apache Pulsar Spring for Apache Pulsar あり —
rsocket RSocket RSocket あり —
integration システム間連携 Spring Integration あり —

監視・ログ・ドキュメント

名前 用途 主に入るもの -test 備考
actuator 稼働状況の確認・管理 Spring Boot Actuator あり 本番向けstarter
micrometer-metrics メトリクス Micrometer Metrics あり —
opentelemetry OpenTelemetry OpenTelemetry あり —
zipkin 分散トレーシング(Zipkin) Zipkin あり —
logging 既定のログ 既定のログ構成 — 技術starter
logback Logbackでログ Logback — 技術starter
log4j2 Log4j2でログ Log4j2 — 技術starter
restdocs APIドキュメント生成 Spring REST Docs — 技術starter

上の表に入らない1件として、本体を持たないテスト専用の spring-boot-starter-web-server-test(Web サーバーのテスト用)があります。

Boot 3からBoot 4への新旧対応表

Migration Guide に載っている改名と、移行用の classic starter の対応です。

Boot 3までの名前 Boot 4での名前 補足
spring-boot-starter-web spring-boot-starter-webmvc 旧名は非推奨として残る
spring-boot-starter-web-services spring-boot-starter-webservices 旧名は非推奨として残る
spring-boot-starter-aop spring-boot-starter-aspectj 必要かどうかの見直しも推奨
spring-boot-starter-oauth2-client spring-boot-starter-security-oauth2-client 旧名は非推奨として残る
spring-boot-starter-oauth2-resource-server spring-boot-starter-security-oauth2-resource-server 旧名は非推奨として残る
spring-boot-starter-oauth2-authorization-server spring-boot-starter-security-oauth2-authorization-server 旧名は非推奨として残る
spring-boot-starter(移行用に) spring-boot-starter-classic 全モジュールを含む
spring-boot-starter-test(移行用に) spring-boot-starter-test-classic 全モジュールのテスト用

aop については、Migration Guide に「starter の範囲をはっきりさせるために spring-boot-starter-aspectj に改名した」「明示的に追加している場合は、置き換える前に本当に必要かを見直してほしい」と書かれています。

このほか、組み込みサーバーの starter は -tomcat・-jetty・-reactor-netty の3つで、Undertow は Servlet 6.1 への対応の都合で外れています。JSON は Jackson 3 に上がり、グループ ID が com.fasterxml.jackson から tools.jackson に変わりました。Spring Boot 4.0 は Java 17 以上が必要です。

classic starterを使う場合・使わない場合

Migration Guide は classic starter を「既存アプリをアップグレードして、まず動かしたいときに使えるもの」と位置づけ、「全モジュールを提供するが、その先の推移的な依存関係は含まない」「いずれは classic starter から移ることを勧める」と説明しています。

状況 選ぶもの 理由
新しく作る 技術ごとの starter 必要なものだけが入り、構成が読みやすい
Boot 3 から上げて、まず起動させたい classic starter これまでに近い形で自動設定がそろう
起動とテストが通った後 技術ごとの starter へ順に移す 公式が勧めている最終形
使っている技術が把握できている 最初から技術ごとの starter 移行を一度で終えられる

classic に切り替えるときは、次の2か所を書き換えます。

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-classic</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-test-classic</artifactId>
    <scope>test</scope>
</dependency>

似たstarterの選び分け

webmvcとwebflux

見るところ webmvc webflux
入るもの Spring MVC と Tomcat WebFlux と Reactor Netty
書き方 1リクエストを順に処理する書き方 リアクティブ(Mono/Flux)な書き方
合う場面 REST API・画面つきWebの多く 全体をリアクティブでそろえる構成
HTTPクライアント -restclient と組み合わせやすい -webclient と組み合わせやすい

迷ったら webmvc から始めると、JPA や JDBC など多くの starter と素直に組み合わせられます。

jdbc・data-jdbc・data-jpa

starter 入るもの 合う場面
-jdbc JDBC と HikariCP(接続プール) SQL を自分で書いて細かく制御する
-data-jdbc Spring Data JDBC リポジトリは欲しいが、仕組みは軽くしたい
-data-jpa Spring Data JPA と Hibernate エンティティ同士の関連を使って開発する

DB へのアクセス方法は1つに決めて、その starter だけを入れると、どの仕組みで SQL が出ているかが明確になります。

tomcatとjetty

公式 How-to では、webmvc に含まれる Tomcat を外して Jetty を入れる方法が次のように示されています。

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-webmvc</artifactId>
    <exclusions>
        <!-- Exclude the Tomcat dependency -->
        <exclusion>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<!-- Use Jetty instead -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
dependencies {
    implementation('org.springframework.boot:spring-boot-starter-webmvc') {
        // Exclude the Tomcat dependency
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat'
    }
    // Use Jetty instead
    implementation "org.springframework.boot:spring-boot-starter-jetty"
}

特に理由がなければ、webmvc に最初から入っている Tomcat のままで進められます。

starterを足しすぎた構成を直した例

Boot 3 の頃の書き方を残したまま、念のための starter も足してある pom.xml を例にします。

直す前(pom-before.xml)

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>4.1.1</version>
        <relativePath/>
    </parent>
    <groupId>com.example</groupId>
    <artifactId>task-api</artifactId>
    <version>0.0.1-SNAPSHOT</version>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-oauth2-resource-server</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-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>

pom.xmlを調べるスクリプト

改名された starter と、省ける候補を表示する小さなスクリプトです。標準ライブラリだけで動きます。

"""pom.xml の Spring Boot starter を調べ、Boot 4 での名前と見直し点を表示する。
使い方: python3 starter_check.py pom.xml
"""
import sys
import xml.etree.ElementTree as ET

PREFIX = "spring-boot-starter"

# Spring Boot 4.0 Migration Guide に載っている改名
RENAMED = {
    "web": "webmvc",
    "web-services": "webservices",
    "aop": "aspectj",
    "oauth2-authorization-server": "security-oauth2-authorization-server",
    "oauth2-client": "security-oauth2-client",
    "oauth2-resource-server": "security-oauth2-resource-server",
}
# 他の starter から入るので、明示しなくてもよいことが多いもの
USUALLY_IMPLIED = {
    "logging": "中心の starter に含まれるログ",
    "tomcat": "webmvc に含まれる組み込みサーバー",
    "test": "各 -test starter から入るテストの土台",
}
NO_TEST_COMPANION = {"", "test", "classic", "test-classic", "tomcat", "jetty",
                     "reactor-netty", "json", "logging", "logback", "log4j2"}


def short_name(artifact_id):
    return artifact_id[len(PREFIX):].lstrip("-")


def main(path):
    ns = {"m": "http://maven.apache.org/POM/4.0.0"}
    root = ET.parse(path).getroot()
    found = []
    for dep in root.findall(".//m:dependencies/m:dependency", ns):
        artifact = dep.findtext("m:artifactId", default="", namespaces=ns)
        scope = dep.findtext("m:scope", default="compile", namespaces=ns)
        if artifact.startswith(PREFIX):
            found.append((short_name(artifact), scope))

    names = {name for name, _ in found}
    print(f"{path}: starter {len(found)} 件")
    for name, scope in found:
        label = f"{PREFIX}-{name}" if name else PREFIX
        notes = []
        new = RENAMED.get(name)
        if new:
            notes.append(f"改名 -> {PREFIX}-{new}")
        if name == "aop":
            notes.append("本当に必要かも確認")
        if name in USUALLY_IMPLIED:
            notes.append(f"省ける候補({USUALLY_IMPLIED[name]})")
        current = new or name
        if (scope != "test" and current not in NO_TEST_COMPANION
                and not current.endswith("-test") and f"{current}-test" not in names):
            notes.append(f"テスト用に {PREFIX}-{current}-test")
        print(f"  {label:<52} {' / '.join(notes) if notes else 'そのまま'}")


if __name__ == "__main__":
    main(sys.argv[1] if len(sys.argv) > 1 else "pom.xml")

実行結果(直す前)

$ python3 starter_check.py pom-before.xml
pom-before.xml: starter 7 件
  spring-boot-starter-logging                          省ける候補(中心の starter に含まれるログ)
  spring-boot-starter-web                              改名 -> spring-boot-starter-webmvc / テスト用に spring-boot-starter-webmvc-test
  spring-boot-starter-tomcat                           省ける候補(webmvc に含まれる組み込みサーバー)
  spring-boot-starter-aop                              改名 -> spring-boot-starter-aspectj / 本当に必要かも確認 / テスト用に spring-boot-starter-aspectj-test
  spring-boot-starter-oauth2-resource-server           改名 -> spring-boot-starter-security-oauth2-resource-server / テスト用に spring-boot-starter-security-oauth2-resource-server-test
  spring-boot-starter-validation                       テスト用に spring-boot-starter-validation-test
  spring-boot-starter-test                             省ける候補(各 -test starter から入るテストの土台)

直した後

直したところ 根拠(公式の記述)
-logging を外す 中心の starter の説明が「自動設定・ログ・YAML を含む」
-web → -webmvc Migration Guide の改名表
-tomcat を外す webmvc の説明が「Spring MVC と Tomcat」
-aop を外す 使っている箇所が無かったため。必要なら -aspectj
-oauth2-resource-server を新名に Migration Guide の改名表
-test を各 -test starter に テスト用 starter が starter-test を連れてくる

直した後(pom-after.xml)

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>4.1.1</version>
        <relativePath/>
    </parent>
    <groupId>com.example</groupId>
    <artifactId>task-api</artifactId>
    <version>0.0.1-SNAPSHOT</version>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-webmvc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security-oauth2-resource-server</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-webmvc-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security-oauth2-resource-server-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
$ python3 starter_check.py pom-after.xml
pom-after.xml: starter 6 件
  spring-boot-starter-webmvc                           そのまま
  spring-boot-starter-security-oauth2-resource-server  そのまま
  spring-boot-starter-validation                       そのまま
  spring-boot-starter-webmvc-test                      そのまま
  spring-boot-starter-security-oauth2-resource-server-test そのまま
  spring-boot-starter-validation-test                  そのまま

本体3つとテスト用3つが対になり、何のための依存かが名前だけで読める形になりました。

starterを選ぶときのチェックリスト

確認すること 見るところ
Boot 4 の名前になっているか 新旧対応表(web・aop・oauth2-*)
本体と -test が対になっているか 全件一覧の「-test」列
他の starter に含まれるものを重ねていないか tomcat・logging・starter-test
DB へのアクセス方法が1つに決まっているか jdbc・data-jdbc・data-jpa
classic starter を使い続けていないか 起動とテストが通ったら技術ごとへ
公式以外の starter の名前 xxx-spring-boot-starter の形

よくある質問

Q. spring-boot-starter-web は Boot 4 でも使えますか? A. 4.1.1 の公式一覧には「非推奨。spring-boot-starter-webmvc を使う」という説明つきで載っています。新しく書くときは webmvc を選び、既存のものは順に書き換えると安心です。

Q. spring-boot-starter-test は書かなくてよいのですか? A. Migration Guide に「テスト用 starter はどれも spring-boot-starter-test を連れてくるので、定義する必要はなくなった」とあります。使っている技術の -test starter を入れれば、JUnit Jupiter・Hamcrest・Mockito もそろいます。

Q. starter に用意されていない技術はどうしますか? A. 公式一覧に無い場合は、その製品が出している xxx-spring-boot-starter を探すか、ライブラリを直接依存関係に足します。公式以外の starter は spring-boot で始まらない名前になっています。

Q. starter のバージョンは個別に書きますか? A. Maven で spring-boot-starter-parent を親にしていれば、starter 側の <version> は書かずに済みます。Spring Boot 本体のバージョンを1か所で決める形です。

まとめ

  • starter は用途ごとの依存関係のまとまりで、公式のものは spring-boot-starter-* という名前
  • Spring Boot 4.1.1 の公式一覧は計 170 件(本体 94、-test 75、テスト専用 1)
  • Boot 4 では web→webmvc、aop→aspectj、oauth2-*→security-oauth2-* に名前が変わった
  • 本体の starter と -test starter を対で入れるのが基本形で、starter-test は自分で書かなくてよい
  • classic starter は移行の途中で使うもの。起動とテストが通ったら技術ごとの starter へ移す
  • 似た starter は「入るもの」で選ぶ(webmvc=MVC+Tomcat、webflux=WebFlux+Reactor Netty など)
  • 他の starter に含まれるもの(tomcat・logging)は重ねずに済む

参考・出典

いずれも 2026年10月7日に確認しました。

  • Spring Boot リファレンス 4.1.1「Build Systems」Starters: https://docs.spring.io/spring-boot/reference/using/build-systems.html
  • Spring Boot 4.0 Migration Guide: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-4.0-Migration-Guide
  • Spring Boot 4.0 Release Notes: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-4.0-Release-Notes
  • Spring Boot How-to「Embedded Web Servers」: https://docs.spring.io/spring-boot/how-to/webserver.html
  • Spring Boot How-to「Database Initialization」: https://docs.spring.io/spring-boot/how-to/data-initialization.html
  • Spring Boot プロジェクトページ: https://spring.io/projects/spring-boot

本記事の内容は、ご自由にお使いください。
ご利用の際は、出典として本ページへのリンクを記載いただけますようお願いします。

(記載例)出典:株式会社RJC「Spring Boot starter一覧|用途別の選び方とBoot 4の新旧対応表」

株式会社RJC ― SI事業・SES事業・AI駆動開発。RJCは一緒に成長を楽しめる会社です。

WE ARE HIRING

RJCで一緒に開発しながら、
成長を楽しみませんか?

RJCは、Web・モバイル・AIを活用した開発プロジェクトで、テックリードやPM・PMOも活躍するシステム開発会社です。会社を知る、待遇を確かめる、話を聞いてみる。気になるところ見てみてください!

  • 127日年間休日
  • 12時間平均残業時間
  • 毎日ガチャ遊びココロも大切にする福利厚生。アマギフなどの賞品ラインナップ!

ほかにも、チケットレストラン、書籍読み放題、2年ごとの慰労報奨(休暇 or 金一封)、11期連続の黒字決算。

ABOUT RJC RJCがどんな会社か知る 考え方、研修、働き方、福利厚生、社員の前職まで。RJCのことが丸わかり! RJC丸わかりページへ JOB DESCRIPTION 仕事内容・待遇を見てみる 仕事内容、給与・待遇、選考の流れ。経験者も未経験も!応募前に知りたいこと、まとめました! 募集要項を見る ENTRY エントリーする エントリーは1〜2分・履歴書不要です。まずは話を聞いてみたい、という方でも歓迎です! エントリーフォームへ

RJCで一緒に開発しながら、 成長を楽しみませんか?