官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 宜黄县| 龙南县| 沧源| 收藏| 汪清县| 广饶县| 三穗县| 松原市| 宁安市| 什邡市| 大荔县| 乌鲁木齐县| 昭苏县| 武城县| 南岸区| 涪陵区| 郯城县| 永和县| 湘乡市| 桐庐县| 密山市| 广东省| 泰兴市| 日土县| 清苑县| 六枝特区| 兴城市| 云南省| 永仁县| 左权县| 大丰市| 凯里市| 定安县| 阿巴嘎旗| 抚松县| 德江县| 大渡口区| 南靖县| 延边| 香格里拉县| 宝鸡市|