Search code examples
javadropwizardmicroservices

How to shutdown dropwizard application?


I am trying to come up with a microservice using dropwizard. The documentation tells how to start the application, but says nothing about terminating it gracefully. Fir example, apache tomcat has both startup and shutdown scripts.

So does anyone know how to terminate a dropwizard application other than pressing Ctrl+C of kill ?


Solution

  • Dropwizard Jetty has shutdown hooks. So kill -SIGINT <pid> works out really well.