Spring cloud 2020 gateway nacos 出现503的情况
程序员文章站
2024-03-20 22:36:52
...
在搭建spring cloud gateway 服务的时候,出现了503(sercice Unavailable),使用的是spring cloud 2020版本,注册中心选用的是nacos。
主要是因为 nacos兼容feign,feign集成ribbon,默认实现负载均衡;nacos不兼容spring cloud gateway自带的ribbon,所以我们只需要重新在gateway中引入feign依赖。
<!--fegin组件 fhadmin.org-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<!-- Feign Client for loadBalancing -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-loadbalancer</artifactId>
</dependency>
上一篇: Go语言简单源代码剖析
下一篇: H3C ISIS重分布路由实验
推荐阅读
-
nacos+spring cloud gateway 出现503 Service Unavailable
-
Spring cloud 2020 gateway nacos 出现503的情况
-
Spring Cloud Gateway的动态路由怎样做?集成Nacos实现很简单
-
基于Nacos实现Spring Cloud Gateway实现动态路由的方法
-
Spring Cloud Gateway 2.x 跨域出现“Multiple CORS header”的问题解决
-
基于Nacos实现Spring Cloud Gateway实现动态路由的方法
-
Spring Cloud Gateway的动态路由怎样做?集成Nacos实现很简单