最新の安定バージョンについては、Spring Boot 3.5.7 を使用してください! |
アプリケーションの起動 (startup)
startup エンドポイントは、アプリケーションの起動シーケンスに関する情報を提供します。
アプリケーションの起動手順の取得
アプリケーションの起動ステップは、スナップショットとして取得するか (GET)、バッファから排出する (POST) ことができます。
アプリケーション起動ステップのスナップショットを取得する
アプリケーションの起動フェーズ中にこれまでに記録されたステップを取得するには、次の curl ベースの例に示すように、GET リクエストを /actuator/startup に送信します。
$ curl 'http://localhost:8080/actuator/startup' -i -X GET結果のレスポンスは次のようになります。
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 890
{
"springBootVersion" : "3.4.11",
"timeline" : {
"startTime" : "2025-10-23T06:44:44.756561296Z",
"events" : [ {
"endTime" : "2025-10-23T06:44:45.068466447Z",
"duration" : "PT0.000006923S",
"startTime" : "2025-10-23T06:44:45.068459524Z",
"startupStep" : {
"name" : "spring.beans.instantiate",
"id" : 3,
"tags" : [ {
"key" : "beanName",
"value" : "homeController"
} ],
"parentId" : 2
}
}, {
"endTime" : "2025-10-23T06:44:45.068472839Z",
"duration" : "PT0.000021951S",
"startTime" : "2025-10-23T06:44:45.068450888Z",
"startupStep" : {
"name" : "spring.boot.application.starting",
"id" : 2,
"tags" : [ {
"key" : "mainApplicationClass",
"value" : "com.example.startup.StartupApplication"
} ]
}
} ]
}
}アプリケーションの起動手順の実行
アプリケーションの起動フェーズ中にこれまでに記録されたステップを排出して返すには、次の curl ベースの例に示すように、POST リクエストを /actuator/startup に作成します。
$ curl 'http://localhost:8080/actuator/startup' -i -X POST結果のレスポンスは次のようになります。
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 890
{
"springBootVersion" : "3.4.11",
"timeline" : {
"startTime" : "2025-10-23T06:44:44.756561296Z",
"events" : [ {
"endTime" : "2025-10-23T06:44:45.015728652Z",
"duration" : "PT0.000237806S",
"startTime" : "2025-10-23T06:44:45.015490846Z",
"startupStep" : {
"name" : "spring.beans.instantiate",
"id" : 1,
"tags" : [ {
"key" : "beanName",
"value" : "homeController"
} ],
"parentId" : 0
}
}, {
"endTime" : "2025-10-23T06:44:45.015755823Z",
"duration" : "PT0.004265699S",
"startTime" : "2025-10-23T06:44:45.011490124Z",
"startupStep" : {
"name" : "spring.boot.application.starting",
"id" : 0,
"tags" : [ {
"key" : "mainApplicationClass",
"value" : "com.example.startup.StartupApplication"
} ]
}
} ]
}
}レスポンス構造
レスポンスには、アプリケーションの起動手順の詳細が含まれます。次の表は、レスポンスの構造を示しています。
| パス | タイプ | 説明 |
|---|---|---|
|
| このアプリケーションの Spring Boot バージョン。 |
|
| アプリケーションの開始時刻。 |
|
| アプリケーションの起動中にこれまでに収集されたステップの配列。 |
|
| このイベントの開始時のタイムスタンプ。 |
|
| このイベントの終了のタイムスタンプ。 |
|
| このイベントの正確な期間。 |
|
| StartupStep の名前。 |
|
| この StartupStep の ID。 |
|
| この StartupStep の親 ID。 |
|
| 追加のステップ情報を含むキーと値のペアの配列。 |
|
| StartupStep タグのキー。 |
|
| StartupStep タグの値。 |