- 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.
- 隨身查:從原始數(shù)據(jù)到完美Excel圖表
- 商務(wù)PPT視覺設(shè)計(jì)高手18課
- Excel VBA語法辭典
- Excel 2010使用詳解
- SAP ECC 5.0/6.0 總賬系統(tǒng)應(yīng)用指南(第2版)
- 辦公自動(dòng)化軟件
- Excel公式與函數(shù)大辭典
- Project 2010企業(yè)項(xiàng)目管理實(shí)踐
- Excel 2010高效辦公:市場(chǎng)與銷售管理
- Word/Excel/PowerPoint 2013三合一辦公應(yīng)用
- AutoCAD2015中文版從入門到精通
- 辦公自動(dòng)化教程(第2版)
- Excel人力資源應(yīng)用之道
- Excel數(shù)據(jù)處理與統(tǒng)計(jì)初步(第4版)
- Excel 2010 SQL完全應(yīng)用