springcloud-3:required a bean of type 'com.netflix.discovery.DiscoveryClient' that could not be found.

在写客户端程序的时候,总是报'com.netflix.discovery.DiscoveryClient' that could not be found。

原因在于导入了错误的类:com.netflix.discovery.DiscoveryClient

应该是引用:org.springframework.cloud.client.discovery.DiscoveryClient

原文地址:https://www.cnblogs.com/huiy/p/8669844.html