标签:ann fast app 关系 filters ppi 修改 lte rewrite
yml基本语法如下:
我遇到这个错误是因为缩进问题:第6行的uri应该与id左对齐,uri下面几句话也要相应左移:
spring:
cloud:
gateway:
routes:
- id: product_route
uri: lb://shoppingmall-product
predicates:
- Path=/api/product/**
filters:
- RewritePath=/api/(?<segment>.*),/$\{segment}
- id: admin_route
uri: lb://renren-fast
predicates:
- Path=/api/**
filters:
- RewritePath=/api/(?<segment>.*),/renren-fast/$\{segment}
修改之后:
spring:
cloud:
gateway:
routes:
- id: product_route
uri: lb://shoppingmall-product
predicates:
- Path=/api/product/**
filters:
- RewritePath=/api/(?<segment>.*),/$\{segment}
- id: admin_route
uri: lb://renren-fast
predicates:
- Path=/api/**
filters:
- RewritePath=/api/(?<segment>.*),/renren-fast/$\{segment}
这样就不会报错了。
标签:ann fast app 关系 filters ppi 修改 lte rewrite
原文地址:https://www.cnblogs.com/studentyang/p/14846070.html