使用服务发现进行手动路由映射
spring:
cloud:
gateway:
discovery.locator:
enabled: true
lowerCaseServiceId: true
routes:
- id: organization-service # This optional ID is an arbitrary route ID.
uri: lb://organization-service # Sets the route’s destination URI
predicates:
- Path=/organization/**
# Filters a collection of Spring web.filters to modify the
# request or response before or after sending the response
filters:
# Rewrites the request path, from /organization/** to /**,
# by taking the path regexp as a parameter and a replacement order
- RewritePath=/organization/(?<path>.*), /$\{path}Last updated