使用SpringCloud Gateway路由请求时,出现如下错误

yml配置如下:

可能的一种原因是:yml配置了gateway.discovery.locator.enabled=true,此时gateway会使用负载均衡模式路由请求,但是SpringCloud Alibaba删除了Ribbon的依赖,无法通过负载均衡路由到指定的微服务,因此出现503报错。需要在pom中手动引入springcloud loadbalancer
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
</dependency>






![[Vue]解决npm run dev报错node:internal/modules/cjs/loader:1031 throw err;](https://img-blog.csdnimg.cn/fff15ffd63bd45ccbb9a47efcec839fe.png)










