- 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.
- Excel職場辦公:表格范例大全
- 輕松學五筆打字
- Word 2003辦公應用實戰從入門到精通
- Flash CS6核心應用案例教程(全彩慕課版)
- Office 2003辦公軟件實用教程
- PowerPoint!讓教學更精彩:PPT課件高效制作(全彩)
- 用WPS讓PPT飛起來:工作型PPT設計從入門到精通
- 圖表之美:打造優秀的Excel圖表
- PowerPivot for Advanced Reporting and Dashboards
- WPS Office辦公應用基礎教程
- 初級會計電算化應用教程(金蝶KIS專業版)
- 辦公自動化項目教程
- 商業智能:從Excel到Power BI的數據可視化(動態圖表篇)
- Office 2010使用詳解
- Word/Excel 2010高效辦公從新手到高手(圖解視頻版)