Spring Cloud 檢索有關(guān)特定路線的信息

2024-01-06 11:14 更新

要檢索有關(guān)一條路線的信息,請向/actuator/gateway/routes/{id}發(fā)送一個(gè)GET請求(例如/actuator/gateway/routes/first_route)。產(chǎn)生的響應(yīng)類似于以下內(nèi)容:

{
  "id": "first_route",
  "predicates": [{
    "name": "Path",
    "args": {"_genkey_0":"/first"}
  }],
  "filters": [],
  "uri": "https://www.uri-destination.org",
  "order": 0
}]

下表描述了響應(yīng)的結(jié)構(gòu)。

路徑 類型 描述

id

String

The route id.

predicates

Array

The collection of route predicates. Each item defines the name and the arguments of a given predicate.

filters

Array

The collection of filters applied to the route.

uri

String

The destination URI of the route.

order

Number

The route order.

以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號