I'm trying to use the Spring endpoints
to gracefully shut down my application but I'm getting an error:
2016-08-09 13:46:54.606 WARN 13315 --- [nio-8090-exec-6] .w.s.m.s.DefaultHandlerExceptionResolver : Handler execution resulted in exception: Request method 'POST' not supported
I'm using this guide and I've set my application.properties
to have endpoints.shutdown.enabled=true
and also endpoints.shutdown.sensitive=false
. I've also included compile("org.springframework.boot:spring-boot-starter-actuator")
in my build.gradle.
When I send the CURL request: curl -X POST https://localhost:8090/shutdown -k
I get the following response from the server:
{"timestamp":1470747537792,"status":405,"error":"Method Not Allowed","exception":"org.springframework.web.HttpRequestMethodNotSupportedException","message":"Request method 'POST' not supported","path":"/shutdown"}
Am I doing anything incorrectly? Is there anything that I may be missing? I have CSRF enabled throughout the app so it's not an option to disable that for my application.