- 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.
- 電腦辦公(Windows 7 + Office 2013)入門與提高(超值版)
- Word/Excel 2016高效辦公從入門到精通
- Android網上班級管理實例:“我的班班”APP平臺建設
- Office 2016辦公應用從入門到精通
- Excel 2010辦公應用實戰從入門到精通(超值版)
- 金蝶ERP-K/3培訓教程:財務/供應鏈/生產制造(第2版)
- Excel 2013超級應用大全(實戰案例版)
- Salesforce Platform Developer I Certification Guide
- Word/Excel/PPT三合一商務辦公應用從入門到精通
- Excel公式與函數大辭典
- 和秋葉一起學Excel(第2版)
- Excel 2013操作與技巧
- 辦公軟件高級應用實驗指導
- MATLAB GUI設計入門與實戰
- Access數據庫程序設計實踐教程