-
Notifications
You must be signed in to change notification settings - Fork 41.9k
Fail to expose actuator health endpoints when using spring-boot-starter-jersey #48789
Description
Hello, I'm upgrading my backend apps to spring-boot 4.0.1 from spring-boot 3 and I'm having an issue with the actuator endpoint when using jersey starter.
If I use spring-boot-starter-jersey with only spring-boot-starter-actuator and the following config
# Jersey Configuration
spring.jersey.application-path=/
# Actuator Configuration
management.server.port=8081
management.endpoints.web.exposure.include=info,health,prometheus,configprops,conditions,env,metrics
management.endpoint.health.probes.add-additional-paths=true
management.endpoint.health.group.readiness.include=readinessState,dbcalling http://localhost:8081/actuator/health/readiness results in a 404 but calling http://localhost:8080/readyz work fine.
On the other hand, if I add spring-boot-starter-web to my dependencies with the same config I'll have http://localhost:8081/actuator/health/readiness working but calling http://localhost:8080/readyz results in a 404.
I have noticed that adding spring.jersey.application-path=/api seems to allow actuator to register additional paths and with that http://localhost:8080/readyz return 200.
You can find an example of theses issues on my repo https://github.com/emouty/spring-boot-issues/tree/spring-boot-4-jersey on branch 'spring-boot-4-jersey'
I would be nice to fix this regression if possible as I would like to avoid needing to play with my ingresses to rewrite base paths across all of my microservices 😅