このバージョンはまだ開発中であり、まだ安定しているとは見なされていません。最新の安定バージョンについては、Spring Boot 3.5.4 を使用してください! |
ビルドシステム
依存関係管理
Spring Boot の各リリースは、サポートしている依存関係のリストを提供しています。Spring Boot が管理しているため、実際には、ビルド設定でこれらの依存関係のバージョンを指定する必要はありません。Spring Boot 自体をアップグレードすると、これらの依存関係も一貫した方法でアップグレードされます。
バージョンを指定して、必要に応じて Spring Boot の推奨を上書きすることもできます。 |
厳選されたリストには、Spring Boot で使用できるすべての Spring モジュールと、サードパーティライブラリの洗練されたリストが含まれています。このリストは、Gradle と Maven の両方で使用できる標準の部品表(spring-boot-dependencies
)として入手できます。
Spring Boot の各リリースは、Spring Framework の基本バージョンに関連付けられています。バージョンを指定しないことを強くお勧めします。 |
Ant
Apache Ant+Ivy を使用して Spring Boot プロジェクトをビルドすることができます。spring-boot-antlib
"AntLib" モジュールも利用可能で、Ant が実行可能な jar を作成できます。
依存関係を宣言するための一般的な ivy.xml
ファイルは、次の例のようになります。
<ivy-module version="2.0">
<info organisation="org.springframework.boot" module="spring-boot-sample-ant" />
<configurations>
<conf name="compile" description="everything needed to compile this module" />
<conf name="runtime" extends="compile" description="everything needed to run this module" />
</configurations>
<dependencies>
<dependency org="org.springframework.boot" name="spring-boot-starter"
rev="${spring-boot.version}" conf="compile" />
</dependencies>
</ivy-module>
典型的な build.xml
は、次の例のようになります。
<project
xmlns:ivy="antlib:org.apache.ivy.ant"
xmlns:spring-boot="antlib:org.springframework.boot.ant"
name="myapp" default="build">
<property name="spring-boot.version" value="4.0.0-M1" />
<target name="resolve" description="--> retrieve dependencies with ivy">
<ivy:retrieve pattern="lib/[conf]/[artifact]-[type]-[revision].[ext]" />
</target>
<target name="classpaths" depends="resolve">
<path id="compile.classpath">
<fileset dir="lib/compile" includes="*.jar" />
</path>
</target>
<target name="init" depends="classpaths">
<mkdir dir="build/classes" />
</target>
<target name="compile" depends="init" description="compile">
<javac srcdir="src/main/java" destdir="build/classes" classpathref="compile.classpath" />
</target>
<target name="build" depends="compile">
<spring-boot:exejar destfile="build/myapp.jar" classes="build/classes">
<spring-boot:lib>
<fileset dir="lib/runtime" />
</spring-boot:lib>
</spring-boot:exejar>
</target>
</project>
spring-boot-antlib モジュールを使用しない場合は、「使い方 ガイド」の spring-boot-antlib を使用せずに Ant から実行可能アーカイブを構築するセクションを参照してください。 |
スターター
スターターは、アプリケーションに含めることができる便利な依存関係記述子のセットです。必要なすべての Spring および関連テクノロジーのワンストップショップを利用して、サンプルコードを探したり、依存関係記述子のコピーアンドペーストを行う必要はありません。例: データベースアクセスに Spring と JPA の使用を開始する場合は、プロジェクトに spring-boot-starter-data-jpa
依存関係を含めます。
スターターには、プロジェクトを迅速に立ち上げて実行するために必要な多くの依存関係と、管理された推移的な依存関係のサポートされたセットが含まれています。
次のアプリケーションスターターは、org.springframework.boot
グループで Spring Boot によって提供されます。
名前 | 説明 |
---|---|
自動構成サポート、ロギング、YAML を含むコアスターター | |
Apache ActiveMQ と JMS を使用するためのスターター | |
Spring AMQP および Rabbit MQ を使用するためのスターター | |
Spring AOP および AspectJ を使用したアスペクト指向プログラミングのスターター | |
Starter for Apache Artemis and JMS | |
Spring Batch を使用するためのスターター | |
Spring のキャッシュサポートを使用するためのスターター | |
Starter for using Cassandra distributed database | |
Cloud Foundry を使用するためのスターター | |
Starter for using Couchbase document-oriented database | |
Cassandra 分散データベースおよび Spring Data Cassandra を使用するためのスターター | |
Cassandra 分散データベースおよび Spring Data Cassandra Reactive を使用するためのスターター | |
Couchbase ドキュメント指向データベースおよび Spring Data Couchbase を使用するためのスターター | |
Couchbase ドキュメント指向データベースおよび Spring Data Couchbase Reactive を使用するためのスターター | |
Elasticsearch 検索および分析エンジンと Spring Data Elasticsearch を使用するためのスターター | |
Spring Data JDBC を使用するためのスターター | |
Hibernate で Spring Data JPA を使用するためのスターター | |
Spring Data LDAP を使用するためのスターター | |
MongoDB ドキュメント指向データベースと Spring Data MongoDB を使用するためのスターター | |
MongoDB ドキュメント指向データベースと Spring Data MongoDB リアクティブを使用するためのスターター | |
Neo4j グラフデータベースと Spring Data Neo4j を使用するためのスターター | |
Spring Data R2DBC を使用するためのスターター | |
Spring Data Redis および Lettuce クライアントで Redis Key-Value データストアを使用するためのスターター | |
Spring Data Redis リアクティブおよび Lettuce クライアントで Redis キー値データストアを使用するためのスターター | |
Spring Data REST および Spring MVC を使用して REST 経由で Spring Data リポジトリを公開するためのスターター | |
Starter for using Elasticsearch search and analytics engine | |
Starter for using Flyway database migrations | |
FreeMarker を使用するためのスターター | |
Starter using Spring GraphQL | |
Starter for using Groovy Templates | |
Starter for using GSON | |
Starter for using Spring HATEOS to build hypermedia-based RESTful Spring MVC web applications | |
Hazelcast を使用するためのスターター | |
Spring Integration を使用するためのスターター | |
Jackson を使用するためのスターター | |
HikariCP 接続プールで JDBC を使用するためのスターター | |
Starter for using JAX-RS and Jersey | |
Starter for using Jetty as the embedded servlet container | |
Starter for using JMS | |
Starter for using jOOQ to access SQL databases with JDBC | |
Starter for reading and writing JSON | |
Starter for Kafka | |
Starter for LDAP | |
Starter for using Liquibase database migrations | |
Java Mail および Spring Framework のメール送信サポートを使用するためのスターター | |
Starter for using MongoDB document-oriented database | |
Mustache を使用するためのスターター | |
Starter for using Neo4j graph database | |
Spring Authorization Server 機能を使用するためのスターター ( | |
Spring Security の OAuth2/OpenID Connect クライアント機能を使用するためのスターター ( | |
Spring Security の OAuth2 リソースサーバー機能を使用するためのスターター ( | |
OpenTelemetry を使用するためのスターター | |
Spring for Apache Pulsar を使用するためのスターター | |
Spring for Apache Pulsar Reactive を使用するためのスターター | |
Quartz スケジューラーを使用するためのスターター | |
Starter for using R2DBC | |
Reactor を使用するためのスターター | |
Starter for Reactor Netty | |
Starter using Spring’s blocking HTTP clients (RestClient, RestTemplate and HTTP Service Clients) | |
RSocket クライアントおよびサーバーを構築するためのスターター | |
Spring Security を使用するためのスターター | |
Spring Authorization Server 機能を使用するためのスターター | |
Spring Security の OAuth2/OpenID Connect クライアント機能を使用するためのスターター | |
Spring Security の OAuth2 リソースサーバー機能を使用するためのスターター | |
Starter for using Spring Security with SAML2 | |
Starter for using Spring Session with Sendgrid | |
Starter for using Spring Session with Spring Data MongoDB | |
Starter for using Spring Session with Spring Data Redis | |
Hazelcast で Spring Session を使用するためのスターター | |
Starter for using Spring Session with JDBC | |
Starter for SQL support | |
JUnit Jupiter、Hamcrest、Mockito などのライブラリを使用して Spring Boot アプリケーションをテストするためのスターター | |
Thymeleaf を使用するためのスターター | |
Starter for using Tomcat | |
Undertow を使用するためのスターター | |
Hibernate Validator で Java Bean Validation を使用するためのスターター | |
Spring MVC を使用して、RESTful を含む Web アプリケーションを構築するためのスターター。デフォルトの埋め込みコンテナーとして Tomcat を使用 ( | |
Spring Web Services を使用するためのスターター ( | |
Starter using Spring’s reactive HTTP clients (WebClient and HTTP Service Clients) | |
Starter for building WebFlux applications using Spring Framework’s Reactive Web support and Reactor Netty | |
Starter for building web, including RESTful, applications using Spring MVC and Tomcat | |
Spring Web Services を使用するためのスターター | |
Spring Framework の MVC WebSocket サポートを使用して WebSocket アプリケーションを構築するためのスターター | |
Zipkin を使用するためのスターター |
アプリケーションスターターに加えて、次のスターターを使用して、本番環境対応機能を追加できます。
名前 | 説明 |
---|---|
Spring Boot のアクチュエーターを使用するためのスターター。アプリケーションの監視と管理に役立つ本番対応機能を提供します |
最後に、Spring Boot には、特定の技術ファセットを除外または交換する場合に使用できる次のスターターも含まれています。
名前 | 説明 |
---|---|
Starter for JSON-B | |
Starter for using Log4j2 | |
Starter for logging using Logback | |
Starter for logging default logging |
コミュニティが提供するその他のスターターのリストについては、GitHub の spring-boot-starters モジュールの README ファイル [GitHub] (英語) を参照してください。 |