Accessing localhost:8080/actuator endpoint (with s

2019-08-16 02:32发布

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.

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) ?

Details:

  • 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 :)

1条回答
祖国的老花朵
2楼-- · 2019-08-16 03:20

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>

Per the docs:

Provides a hypermedia-based “discovery page” for the other endpoints. Requires Spring HATEOAS to be on the classpath.

查看更多
登录 后发表回答