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

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.

主站蜘蛛池模板: 岳池县| 大厂| 西安市| 蒙城县| 牙克石市| 阜新| 石门县| 方城县| 板桥市| 乐业县| 富阳市| 永胜县| 尚志市| 和平区| 沂源县| 阿瓦提县| 廉江市| 怀柔区| 广昌县| 怀安县| 德化县| 宝兴县| 额尔古纳市| 资溪县| 宜良县| 西宁市| 阳高县| 交城县| 安阳县| 忻城县| 三都| 抚顺市| 漳浦县| 永泰县| 博兴县| 唐河县| 锡林浩特市| 吉安县| 两当县| 同仁县| 衡阳县|