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

posted @ 2018-03-29 14:56  huiy_小溪  阅读(667)  评论(0编辑  收藏  举报