Reputation: 99
I am using the actuator/shutdown
endpoint to make graceful shutdown of application. But what I need is to get the 404 Http response from application when it is in shutdown mode. Is it possible to make such a thing using the actuator?
Upvotes: 0
Views: 1615
Reputation: 10466
Starting from Spring Boot 2.3 there is a property graceful shutdown.
server.shutdown=graceful
It will ensure a 503 (service unavailable) response is returned when shutting down. This seems more appropriate I guess than 404. However, with a reverse proxy such as nginx
you will be able to change the status code.
Upvotes: 1