- Mastering Spring Boot 2.0
- Dinesh Rajput
- 140字
- 2021-06-25 21:29:20
Changing endpoint IDs
As you have seen in the table of all Actuator endpoints, each of the Actuator endpoints has an ID that is used to call that endpoint as a REST service. For example /health, /metrics, and /beans endpoints have health, metrics, and beans, respectively, as their IDs. But you can change this endpoint ID and set what you want for your application as follows:
endpoints.endpoint-id.id=new_id
For example, let's customize the ID of the /health endpoint. Now I want to change it to GET requests sent to /status. In the application.properties file, it looks like this:
health.id = status
In the application.yml file, it looks like this:
health: id: status
Now you can check the health of your application by using the /status custom endpoint. It will work the same as the /health endpoint.
推薦閱讀
- Excel 2010中文版完全自學手冊
- Excel 2019公式與函數應用大全(視頻教學版)
- Hands-On G Suite for Administrators
- 高效能辦公必修課:Excel數據處理
- 電腦辦公(Windows 10 + Office 2016)入門與提高
- Excel公式與函數大辭典
- Excel 2016高級應用案例教程(視頻指導版)
- Word/Excel/PPT 2019應用大全
- 新編Word/Excel/PPT 2016高效辦公三合一(全彩版)
- Yammer Starter
- 中文PowerPoint 2003應用基礎
- Word/Excel/PPT 2016高效辦公實戰從入門到精通
- 零基礎學游戲UI設計
- AutoCAD2015中文版從入門到精通
- 征服Power BI:提升辦公數字化能力的45個實戰技巧