我遇到了一个问题,即Spring Boot执行器未公开包含暴露的执行器链接的发现页面。同时,我可以访问诸如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
}
}
}
我缺少任何配置吗?
我创建了一个小的示例项目here,供您试用。