Reputation: 791
i'm using spring boot 2.0.0.M3 with the spring-boot-starter-actuator. I enabled two health checks:
management.health.diskspace.enabled=true
management.health.mongo.enabled=true
The healt check beans are created by the auto configure, but not the HealthMvcEndpoint
. The response of localhost:8080/health
is 404.
What did I do wrong?
Thanks in advance
EDIT:
Mhm do the actuator project works with reactive and webflux? Ok found this issue: https://github.com/spring-projects/spring-boot/issues/7970
Upvotes: 3
Views: 3213
Reputation: 6302
Include the spring-boot-starter-web dependency in your pom.xml:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
Upvotes: 0
Reputation: 958
Add this to your application.properties file:
management.endpoints.web.base-path=/
The actuator endpoints will now be '/health'
Upvotes: 0
Reputation: 21
I'm using webflux+springboot 2.0.2.RELEASE. Checking the logs I found that it is actuallu under /actuator now.
so: http://localhost:8080/actuator/health
will work
Upvotes: 1
Reputation: 2101
according to the documentations for 2.0.0M the actuator endpoints have been prefixed with /application
so they become /application/health
instead.
You should also be able to see all this in the info
logs about the endpoints, when booting up your application
also an actual release note about it: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0.0-M1-Release-Notes#actuator-default-mapping
Upvotes: 1