4
votes

I have a Spring-boot project that uses spring-boot actuator to provide application statistics and metrics.

The actuator functionality is being provided by adding "spring-boot-starter-actuator" to the project.

At this point, security is disable, so the project does not import spring-security.

Using spring-boot 1.5.x, all actuator Endpoints (automatic provided, as the /info, as well as my specific defined endpoints), are working correctly.

After updating to Spring-boot 2.0.0 M1, the actuator endpoints are no longer exposed. Invoking the /info endpoint returns the following error:

{"timestamp":1496948526890,"status":404,"error":"Not Found","message":"No 
message available","path":"/info"}

A note regarding Tomcat: i'm redefining the tomcat.version property, in order to use version 9.

  • When using spring-boot 1.5.x, tomcat.version=9.0.0.M9
  • When using spring-boot 2.0.0.M1, tomcat.version=9.0.0.M21
4
Does this work when not overriding the Tomcat version? I'm not sure this version is officially supported (yet) by Spring Boot. - Brian Clozel
When removing the override, spring-boot uses Tomcat version 8.5.15. Unfortunately, i got the same error. I've changed log levels to TRACE, could you please have a look to the logs, to see if you can spot anything? Please download the log here: meocloud.pt/link/4d4c29c6-dc77-4b64-9ef4-fb14038836a7/log.log - VSOS

4 Answers

6
votes

It look's like the endpoint is no longer mapped to /info

2017-06-08 13:11:57.817 [main] INFO o.s.b.a.e.mvc.EndpointHandlerMapping - Mapped "{[/application/info || /application/info.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()

and according to the 2.0.0/SNAPSHOT documentation this is expected.

https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#production-ready-endpoints

Try /application/info

7
votes

And it's moved again. Right now, the URL are living under /actuator, for example: /actuator/health.

See https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#production-ready-endpoints

3
votes

try this

management: endpoints: web: exposure: include: '*' base-path: /actuator

2
votes

Even you could define a specific path using the management attribute:

management.context-path =

If you set an empty space, you can reach "/info", as you want.