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

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.

主站蜘蛛池模板: 厦门市| 敦煌市| 永年县| 山丹县| 台安县| 丹棱县| 临沧市| 遵义县| 江油市| 广宁县| 嵊州市| 玉树县| 金川县| 博罗县| 黔西县| 民权县| 固阳县| 开远市| 新邵县| 秦皇岛市| 新竹县| 鄯善县| 城固县| 阳信县| 弥渡县| 武义县| 东兴市| 新巴尔虎左旗| 隆林| 湟中县| 武平县| 威信县| 门源| 泰兴市| 会理县| 河北区| 泗水县| 祁东县| 甘谷县| 深泽县| 新昌县|