情報 (info
)
info
エンドポイントは、アプリケーションに関する一般情報を提供します。
情報を取得する
アプリケーションに関する情報を取得するには、次の curl ベースの例に示すように、GET
リクエストを /actuator/info
に作成します。
$ curl 'http://localhost:8080/actuator/info' -i -X GET
結果のレスポンスは次のようになります。
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 231
{
"git" : {
"branch" : "main",
"commit" : {
"id" : "df027cf",
"time" : "2025-03-20T10:40:21Z"
}
},
"build" : {
"artifact" : "application",
"version" : "1.0.3",
"group" : "com.example"
}
}
レスポンス構造
レスポンスには、アプリケーションに関する一般的な情報が含まれます。レスポンスの各セクションは、InfoContributor
によって提供されます。Spring Boot は、以下で説明する複数の提供元を提供します。