微服务网关Gateway-PrefixPath讲解
生活随笔
收集整理的這篇文章主要介紹了
微服务网关Gateway-PrefixPath讲解
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
PrefixPath 過(guò)濾配置
用戶每次請(qǐng)求路徑的時(shí)候,我們可以給真實(shí)請(qǐng)求加一個(gè)統(tǒng)一前綴,例如用戶請(qǐng)求http://localhost:8001的時(shí)候我們讓它請(qǐng)求真實(shí)地址http://localhost:8001/brand,如下配置:
routes:- id: goods_routeuri: http://localhost:18081predicates:#- Host=cloud.leon.com**- Path=/**filters:- PrefixPath=/brand測(cè)試請(qǐng)求http://localhost:8001/效果如下:
?
總結(jié)
以上是生活随笔為你收集整理的微服务网关Gateway-PrefixPath讲解的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 微服务网关Gateway中StripPr
- 下一篇: 微服务网关-Gateway-LoadBa