10.商品服務-新增商品
阿新 • • 發佈:2021-08-10
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}