[英]Spring Boot Actuator discovery endpoint returns 404
我遇到了 Spring Boot Actuator 的问题,它没有公开包含指向公开执行器的链接的发现页面。 同时,我可以访问执行器,例如info
、 health
和metrics
。
我正在使用 Spring Boot 2.1.8,我的application.yml
看起来像这样:
info:
artifact: spring-actuator-example
name: Spring Boot Actuator Example
description: Spring Boot Actuator Example
version: 1.0.0
#Exposes Spring actuator endpoints
management:
server:
port: 7979
servlet:
context-path: /actuator
endpoint:
health:
show-details: always
endpoints:
web:
base-path: /
exposure:
include: "*"
如果我尝试访问/actuator
端点,我会得到
{
timestamp: "2019-09-18T19:55:25.622+0000",
status: 404,
error: "Not Found",
message: "No message available",
path: "/actuator/"
}
而不是像
{
"_links": {
"self": {
"href": "http://localhost:7979/actuator",
"templated": false
},
"info": {
"href": "http://localhost:7979/actuator/info",
"templated": false
},
"health": {
"href": "http://localhost:7979/actuator/health",
"templated": false
},
"metrics": {
"href": "http://localhost:7979/actuator/metrics",
"templated": false
}
}
}
有没有我缺少的配置?
我在这里创建了一个小示例项目供您试用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.