1.配置会员模块网关信息
网关配置
spring: cloud: gateway: routes: #商品的路由 #localhost:88/api/product/category/list/tree--->localhost:10000/product.... #优先级比下面的哪个路由要高所以要放在上面,不然会被截断 - 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: #api前缀去掉剩下的全体保留 - RewritePath=/api/(?<segment>.*),/$\{segment} - id: admin_route #lb表示负载均衡 uri: lb://renren-fast #规定前端项目必须带有一个api前缀 #原来验证码的uri ...localhost:88/api/captcha.jpg #应该改成的uri ...localhost:88/renrenfast/captcha.jpg predicates: - Path=/api/** filters: - RewritePath=/api/(?<segment>.*),/renren-fast/$\{segment}