访问 localhost:8080/执行器端点(使用 spring 引导执行器)
Accessing localhost:8080/actuator endpoint (with spring boot actuator)
在 spring docs 中,我已经阅读了名为 "actuator" 的端点,它是由执行器依赖项提供的,但我还没有设法在我的本地测试应用程序上访问它。
问题:有人知道如何访问该端点吗?如果可能的话,粗糙:)
子问题1:如果这个端点存在,那么为什么隐藏它?
子问题 2: 如果这个端点不存在,我们如何通知 spring.io 更正文档页面(打开某种票证)?
详情:
- 我想访问 "actuator" 端点,而不是 spring 引导执行器 (localhost:8080/actuator)
提供的其他端点
- 是的,我已尝试在属性文件中手动启用该端点(endpoints.enabled=true 或 endpoints.actuator.enabled=true)
- 是的,我试过了enable/disableendpoints.sencitive属性
- 是的,执行器的其他端点工作正常
- 我需要它没有特殊原因,只是想尝试一下(只是学习新东西:))
- 请不要只回答"there is no such endpoint dude!",写在docs
里面应该是有原因的
- 回答前请使用我现在使用的spring启动版本"it is working for me with these configs"(spring启动版本:1.5.4.RELEASE)
- 提前谢谢你:)
您必须包含 Spring Hateoas 依赖项才能使 /actuator
端点可用:
<dependency>
<groupId>org.springframework.hateoas</groupId>
<artifactId>spring-hateoas</artifactId>
</dependency>
根据 docs:
Provides a hypermedia-based “discovery page” for the other endpoints.
Requires Spring HATEOAS to be on the classpath.
在 spring docs 中,我已经阅读了名为 "actuator" 的端点,它是由执行器依赖项提供的,但我还没有设法在我的本地测试应用程序上访问它。
问题:有人知道如何访问该端点吗?如果可能的话,粗糙:)
子问题1:如果这个端点存在,那么为什么隐藏它?
子问题 2: 如果这个端点不存在,我们如何通知 spring.io 更正文档页面(打开某种票证)?
详情:
- 我想访问 "actuator" 端点,而不是 spring 引导执行器 (localhost:8080/actuator) 提供的其他端点
- 是的,我已尝试在属性文件中手动启用该端点(endpoints.enabled=true 或 endpoints.actuator.enabled=true)
- 是的,我试过了enable/disableendpoints.sencitive属性
- 是的,执行器的其他端点工作正常
- 我需要它没有特殊原因,只是想尝试一下(只是学习新东西:))
- 请不要只回答"there is no such endpoint dude!",写在docs 里面应该是有原因的
- 回答前请使用我现在使用的spring启动版本"it is working for me with these configs"(spring启动版本:1.5.4.RELEASE)
- 提前谢谢你:)
您必须包含 Spring Hateoas 依赖项才能使 /actuator
端点可用:
<dependency>
<groupId>org.springframework.hateoas</groupId>
<artifactId>spring-hateoas</artifactId>
</dependency>
根据 docs:
Provides a hypermedia-based “discovery page” for the other endpoints. Requires Spring HATEOAS to be on the classpath.