访问localhost:8080/actuator终结点(带有spring boot促动器) [英] Accessing localhost:8080/actuator endpoint (with spring boot actuator)
问题描述
在春季文档我已经阅读了由执行器依赖项提供的名为执行器"的端点,但是我没有设法在本地测试应用程序上访问它.
In spring docs I have read about endpoint named "actuator" which is provided by actuator dependency, but I haven't managed to access it on my local testing app.
问题:有人知道如何访问该端点吗?如果可能的话,进行粗加工:)
子问题1:如果该端点存在,那么为什么将其隐藏?
子问题2:如果该端点不存在,我们如何通知spring.io纠正文档页面(打开某种票证)?
Question: Does someone know how to access that endpoint? of coarse if it is possible :)
Sub-question 1: If this endpoint exists, then why it is hidden?
Sub-question 2: If this endpoint doesn't exist, how can we notify spring.io to correct documentation page (open some kind of ticket) ?
详细信息:
- 我想访问完全执行器"端点,而不是Spring Boot执行器(localhost:8080/actuator)提供的其他端点
- 是的,我尝试在属性文件(endpoints.enabled = true或endpoints.actuator.enabled = true)中手动启用该端点
- 是的,我尝试启用/禁用endpoints.sencitive属性
- 是的,执行器的其他端点工作正常
- 我不需要这样做的特殊原因,只想尝试一下(只是学习新东西:))
- 请不要仅仅回答没有这样的端点家伙!",应该出于某种原因将其写入 spring boot version:1.5.4.RELEASE )
- 预先感谢您:)
- I want to access exactly "actuator" endpoint, not other endpoints provided by spring boot actuator (localhost:8080/actuator)
- Yes, I have tried to enable that endpoint manually in properties file (endpoints.enabled=true OR endpoints.actuator.enabled=true)
- Yes, I have tried to enable/disable endpoints.sencitive property
- Yes, other endpoints of actuator work just fine
- No special reason why I need that, just want to try it out (just learning new stuff :) )
- Please don't just answer "there is no such endpoint dude!", there should be some kind of reason why it is written in the docs
- Please use spring boot version which I am using now before answering "it is working for me with these configs" (spring boot version: 1.5.4.RELEASE)
- Thank you in advance :)
推荐答案
您必须包含 Spring Hateoas 依赖关系,以使/actuator
端点可用:
You must include the Spring Hateoas dependency in order for the /actuator
endpoint to become available:
<dependency>
<groupId>org.springframework.hateoas</groupId>
<artifactId>spring-hateoas</artifactId>
</dependency>
每个 docs :
为其他端点提供基于超媒体的发现页面". 要求Spring HATEOAS位于类路径上.
Provides a hypermedia-based "discovery page" for the other endpoints. Requires Spring HATEOAS to be on the classpath.
这篇关于访问localhost:8080/actuator终结点(带有spring boot促动器)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!