1. 程式人生 > 其它 >第193天學習打卡(專案 穀粒商城35 除錯會員等級相關介面)

第193天學習打卡(專案 穀粒商城35 除錯會員等級相關介面)

除錯會員等級相關介面

gulimall-gateway

application.yml(這是原本沒有修改的檔案)

spring:
cloud:
gateway:
routes:

- id: product_route
uri: lb://gulimall-product
predicates:
- Path=/api/product/**
filters:
- RewritePath=/api/(?<segment>.*),/$\{segment}



- id: third_party_route
uri: lb://gulimall-third-party
predicates:
- Path=/api/thirdparty/**
filters:
- RewritePath=/api/thirdparty/(?<segment>.*),/$\{segment}


- id: third_party_route
uri: lb://gulimall-third-party
predicates:
- Path=/api/thirdparty/**
filters:
- RewritePath=/api/(?<segment>.*),/$\{segment}



- id: admin_route
uri: lb://renren-fast
predicates:
- Path=/api/**
filters:
- RewritePath=/api/(?<segment>.*),/renren-fast/$\{segment}

這裡添加了member的閘道器

gulimall-gateway

application.yml

spring:
cloud:
gateway:
routes:


- id: product_route
uri: lb://gulimall-product
predicates:
- Path=/api/product/**
filters:
- RewritePath=/api/(?<segment>.*),/$\{segment}

- id: third_party_route
uri: lb://gulimall-third-party
predicates:
- Path=/api/thirdparty/**
filters:
- RewritePath=/api/thirdparty/(?<segment>.*),/$\{segment}

- id: member_route
uri: lb://gulimall-member
predicates:
- Path=/api/member/**
filters:
- RewritePath=/api/(?<segment>.*),/$\{segment}



- id: admin_route
uri: lb://renren-fast
predicates:
- Path=/api/**
filters:
- RewritePath=/api/(?<segment>.*),/renren-fast/$\{segment}




點選新增就會有相應的操作了

B站學習網址:全網最強電商教程《穀粒商城》對標阿里P6/P7,40-60萬年薪嗶哩嗶哩bilibili