- 当采用如下eureka的client依赖时,使用Ribbon负载均衡报错
<!--Eureka client-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
- 原因是没有指定版本,默认版本过高,其中不包含Ribbon的依赖,但是相关注解都不会报错,只需将版本指定为
<version>2.1.0.RELEASE</version>
即可