如何关闭dropwizard应用程序? [英] How to shutdown dropwizard application?

查看:94
本文介绍了如何关闭dropwizard应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用dropwizard提供微服务. 该文档介绍了如何启动该应用程序,但没有说明如何优雅地终止该应用程序.例如,apache tomcat具有启动关闭脚本.

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.

除了按killCtrl+C以外,还有谁知道如何终止dropwizard应用程序吗?

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

推荐答案

Dropwizard Jetty具有关闭钩子.因此kill -SIGINT <pid>的效果非常好.

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

这篇关于如何关闭dropwizard应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆