Skip to content
Advertisement

Why is the shutdown endpoint not enabled in my application?

I am trying to add a shutdown endpoint actuator/shutdown in my Spring application as explained in this tutorial so that I can gracefully shutdown the application using a call like curl -X POST localhost:8080/actuator/shutdown.

I added

JavaScript

to my pom.xml and

JavaScript

to src/main/resources/application.yaml.

But when I run curl -X POST localhost:8080/actuator/shutdown, I get the following response:

JavaScript

I don’t see the shutdown endpoint at http://localhost:8080/actuator:

Screenshot of actuator endpoints

What am I doing wrong? What do I need to change in order for the actuator/shutdown endpoint to appear?

Advertisement

Answer

It appears you are using yaml, * has a special meaning in yaml and must be quoted.

The following should work

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement