相关疑难解决方法(0)

如何在spring boot health中添加自定义运行状况检查?

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
Run Code Online (Sandbox Code Playgroud)

这将为您的应用程序添加几个有用的端点.其中之一是/健康.当您启动应用程序并导航到/ health端点时,您将看到它已返回一些数据.

{
    "status":"UP",
    "diskSpace": {
        "status":"UP",
        "free":56443746,
        "threshold":1345660
    }
}
Run Code Online (Sandbox Code Playgroud)

如何在spring boot health中添加自定义运行状况检查?

spring spring-boot spring-boot-actuator

24
推荐指数
3
解决办法
3万
查看次数

标签 统计

spring ×1

spring-boot ×1

spring-boot-actuator ×1