- 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.
- 計算機聯鎖圖冊(第二版)
- Excel 2016表格、公式、函數與圖表應用傻瓜書
- 高效隨身查:PPT2021必學的美化設計應用技巧(視頻教學版)
- Office辦公高手應用技巧
- Excel 2010高效辦公:市場與銷售管理
- Office 2007辦公軟件應用立體化教程
- Excel高效辦公:市場與銷售管理(修訂版)
- 現用現查:電腦BIOS/注冊表設置實戰秘籍
- Excel人力資源管理必備的200個文件
- Office 2013從新手到高手(超值版)
- 新編PowerPoint 2016從入門到精通
- Excel 2010 SQL完全應用
- Office 2013應用技巧實例大全
- PowerShell for Office 365應用實戰
- PPT 2021完全自學教程