健康终点不在弹簧启动器执行器服务中工作

问题描述 投票:1回答:1

嗨,我使用的是春季启动版 - 2.0.0.RC1。我有简单的服务运行@port 9400。

我的application.properties具有以下配置:

spring.main.banner-mode = CONSOLE
spring.profiles.active  = ${profile:local}

server.compression.enabled = true
server.compression.min-response-size = 1
server.compression.mime-types = application/json,application/xml,text/xml,text/plain

banner.charset              = UTF-8

management.endpoints.health.show-details=true
management.server.address: 127.0.0.1
management.endpoints.web.expose: health,info,metrics,mappings,trace
management.endpoints.health.show-details: true
management.endpoints.health.time-to-live: 2000
management.security.enabled: false
management.health.defaults.enabled: false
management.health.diskspace.enabled: true

我的build.gradle有:

dependencies {
    // Spring Boot
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-webflux', version: springBootVersion
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: springBootVersion
}

我的gradle.properties:

springBootVersion    = 2.0.0.RC1

当我指向http://127.0.0.1:9400/health

我将错误屏幕作为附加快照。

我错过了什么?enter image description here

spring-boot-actuator health-monitoring
1个回答
2
投票

您提供的show-details值不是有效值...无论如何,在Spring Boot 2.0中,执行器端点(如运行状况)将重新映射到/ actuator / *。现在,健康位于/执行/健康。

有关https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0.0-RC2-Release-Notes#health-endpoint发行说明的更多信息

© www.soinside.com 2019 - 2024. All rights reserved.