- Mastering Spring Boot 2.0
- Dinesh Rajput
- 153字
- 2021-06-25 21:29:20
Shutting down your application
You can also shut down your application by using the /shutdown endpoint. But by default, this endpoint is disabled, so first, you have to enable the /shutdown endpoint, and then you can use it as follows:
endpoints.shutdown.enabled=true
Let's enable it by using the application.yml file:
endpoints: shutdown: enabled: true
Let's invoke the /shutdown endpoint and see what happens:
POST http://localhost:8080/shutdown
The preceding is a POST request. It returns the following response:
{ "message": "Shutting down, bye..." }
This /shutdown endpoint can kill your application, so you have to take care with this endpoint.
Spring Boot's Actuator provides most of the insight you require concerning your running application in production, but sometimes it is not enough for your needs. That is why Spring Boot also allows you to customize the Actuator endpoints.
Let's see in the next section how to customize the endpoints of Spring Boot's Actuator.
- 中文版Rhino 5.0實用教程
- Linux操作系統與服務配置
- Word/Excel/PPT 2016辦公應用從入門到精通 2(精進工作)
- Office 2016入門與提高
- Oracle CX Cloud Suite
- 跟李銳學Excel數據分析
- 財務必須知道的115個Excel函數
- Excel 2013從入門到精通
- Word/Excel 2003辦公應用實戰從入門到精通
- 微軟辦公軟件國際認證(MOS)Office 2010大師級通關教程(第2版)
- 和秋葉一起學WPS Office
- PPT2013制作超級應用大全(實戰案例版)
- Pentaho 5.0 Reporting by Example
- PowerPoint 2010從入門到精通
- WPS Office 2019高級應用案例教程