应用启动(启动)
这启动端点提供关于应用程序启动序列的信息。
检索应用程序启动步骤
应用程序启动步骤可以作为快照检索(获取)或从缓冲区排空(发布).
获取应用程序启动步骤的快照
要检索应用启动阶段迄今为止记录的步骤,请设置获取请求/执行器/启动如以下基于卷度的示例所示:
$ 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: 889
{
"springBootVersion" : "4.0.0",
"timeline" : {
"events" : [ {
"duration" : "PT0.000004919S",
"endTime" : "2025-11-20T16:34:00.967233818Z",
"startTime" : "2025-11-20T16:34:00.967228899Z",
"startupStep" : {
"id" : 3,
"name" : "spring.beans.instantiate",
"parentId" : 2,
"tags" : [ {
"key" : "beanName",
"value" : "homeController"
} ]
}
}, {
"duration" : "PT0.000017743S",
"endTime" : "2025-11-20T16:34:00.967239168Z",
"startTime" : "2025-11-20T16:34:00.967221425Z",
"startupStep" : {
"id" : 2,
"name" : "spring.boot.application.starting",
"tags" : [ {
"key" : "mainApplicationClass",
"value" : "com.example.startup.StartupApplication"
} ]
}
} ],
"startTime" : "2025-11-20T16:34:00.724929795Z"
}
}
排空应用程序启动步骤
要提取并返回应用启动阶段已记录的步骤,请发布请求/执行器/启动如以下基于卷度的示例所示:
$ 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: 889
{
"springBootVersion" : "4.0.0",
"timeline" : {
"events" : [ {
"duration" : "PT0.000241159S",
"endTime" : "2025-11-20T16:34:00.901447942Z",
"startTime" : "2025-11-20T16:34:00.901206783Z",
"startupStep" : {
"id" : 1,
"name" : "spring.beans.instantiate",
"parentId" : 0,
"tags" : [ {
"key" : "beanName",
"value" : "homeController"
} ]
}
}, {
"duration" : "PT0.006622839S",
"endTime" : "2025-11-20T16:34:00.901482577Z",
"startTime" : "2025-11-20T16:34:00.894859738Z",
"startupStep" : {
"id" : 0,
"name" : "spring.boot.application.starting",
"tags" : [ {
"key" : "mainApplicationClass",
"value" : "com.example.startup.StartupApplication"
} ]
}
} ],
"startTime" : "2025-11-20T16:34:00.724929795Z"
}
}
响应结构
回复包含应用启动步骤的详细信息。 下表描述了该反应的结构:
| 路径 | 类型 | 描述 |
|---|---|---|
|
|
该应用的 Spring Boot 版本。 |
|
|
申请开始时间。 |
|
|
这是目前应用启动过程中收集的一系列步骤。 |
|
|
本次活动开始的时间戳。 |
|
|
这是本次活动结束的时间戳。 |
|
|
这场事件的确切持续时间。 |
|
|
这就是StartupStep的名称。 |
|
|
这个StartupStep的ID。 |
|
|
这是该启动步骤的父ID。 |
|
|
一组带有额外步骤信息的键/值对。 |
|
|
StartupStep 标签的关键。 |
|
|
StartupStep 标签的价值。 |