关闭(shutdown

shutdown 端点用于关闭应用程序。

关闭应用程序

要关闭应用程序,请对 /actuator/shutdown 发起 POST 请求,如下所示的 curl 示例:

$ curl 'http://localhost:8080/actuator/shutdown' -i -X POST

会产生类似如下的响应:

HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 41

{
  "message" : "Shutting down, bye..."
}

响应结构

响应包含关闭请求结果的详细信息。 下表描述了响应的结构:

Path Type Description

message

String

Message describing the result of the request.