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

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.

主站蜘蛛池模板: 泸溪县| 融水| 武宁县| 阿城市| 海伦市| 邮箱| 广宁县| 兴安盟| 鄂温| 南澳县| 秦皇岛市| 噶尔县| 崇礼县| 石狮市| 大荔县| 崇阳县| 黔西| 开江县| 金昌市| 寿光市| 玉门市| 安溪县| 瑞丽市| 左云县| 巴东县| 东方市| 昌江| 隆林| 漠河县| 武陟县| 同心县| 松江区| 赤峰市| 类乌齐县| 和田县| 拉萨市| 尼木县| 广饶县| 石屏县| 江达县| 正阳县|