- Mastering Spring Boot 2.0
- Dinesh Rajput
- 177字
- 2021-06-25 21:29:20
Enabling or disabling endpoints
By default in Spring Boot, all endpoints are enabled except /shutdown, but you can disable some of them. You can also enable the /shutdown endpoint.
In the application.properties file, it would look like this:
endpoints.shutdown.enabled=true
In the application.yml file, it would look like this:
endpoints: shutdown: enabled: true
Similarly, you can also disable any of the other endpoints as follows:
endpoints._endpoint-id.enabled = false
In the application.yml file, it would look like this:
endpoints: _endpoint-id: enabled: false
Let's suppose you want to disable the /health endpoint. Then in the application.properties file, you have to set the following property:
endpoints.health.enabled=true
In application.yml, it would look like this:
endpoints: health: enabled: false
You can also disable all endpoints at once by setting the following property to false in the application.properties file:
endpoints.enabled=false
In the application.yml file, it would look like this:
endpoints: enabled: false
As you can see, all endpoints will be disabled, so you can enable specific endpoints if you want to enable then by setting endpoints._endpoint-id.enabled = true.
- 中文版Rhino 5.0實用教程
- 從原始數據到分析報告:Excel數據透視表高效達人養成記
- Word/Excel/PPT 2007入門與提高(超值版)
- Excel函數辭典
- Unity 2018 AR與VR開發快速上手
- WPS Office商務辦公從新手到高手
- OpenCV Computer Vision Application Programming Cookbook Second Edition
- 從零開始學Excel 2010
- Excel 2013從入門到精通
- 非常Easy:Excel財務高效管理
- Office 2007辦公軟件應用立體化教程
- Excel數據透視表從入門到精通
- Word/Excel/PowerPoint 2013三合一辦公應用
- Word、Excel 行政與文秘高效辦公必備
- Project 2007企業項目管理實踐