我第一次尝试实现Spring,当我试图启用application.properties中的所有端点时,它显示了'management.endpoints.web.exposure.include‘是一个未知的属性。对请求的答复是:
{
"timestamp": "2020-08-26T06:07:47.120Z",
"status": 404,
"error": "Not Found",
"message": "No message available",
"path": "/actuator/health"
}除此之外,我刚才还包括了
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>在pom.xml和别的什么都没有。我错过什么了吗?
发布于 2020-08-26 08:13:20
您是否也添加了spring作为依赖项?
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>发布于 2022-11-17 13:42:51
为了解决这个错误,我添加了执行器依赖项并构建了我的项目一次,因此错误消失了。
执行器版本为2.7.2
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>https://stackoverflow.com/questions/63591780
复制相似问题