spring:cloud:gateway:#设置路由:路由id、路由到微服务的uri、断言routes:- id: order_route #路由ID,全局唯一uri: http://localhost:8020 #目标微服务的请求地址和端口#配置过滤器工厂filters:- AddRequestParameter=color, blue # 添加请求参数
测试http://localhost:8888/order/testgateway3
@GetMapping("/testgateway3")public String testGateway3(@RequestParam("color") String color) throws Exception {log.info("gateWay获取请求参数color:"+color);return "success";}

