【发布时间】:2019-12-02 14:30:13
【问题描述】:
我有一个运行 Spring Boot 和 Spring Cloud Streams 的小项目,版本为 Greenwich.SR4。
到目前为止,我已尝试包含以下依赖项。
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator-autoconfigure</artifactId>
</dependency>
想要有一个基本上返回代码 200 的 /check/health 端点。
我已经相应地修改了配置,这样我就没有无用的健康配置。
management.endpoints.web.base-path=/check
management.endpoint.health.enabled=true
management.health.solr.enabled=false
management.health.elasticsearch.enabled=false
但是,每当我尝试运行 localhost:8080/check/health 时,都会提示 404。会发生什么?
还提到我已经尝试包含我自己的@RestController,但会发生同样的行为。
【问题讨论】:
-
spring-boot-starter-parent你用的是哪个版本的?
标签: spring spring-boot spring-boot-actuator