SpringCloud报错: "Field discoveryClient in com.controller.DcController required a bean of type 'com.netflix.discovery.DiscoveryClient' that could not be found."

SpringCloud报错:

"Field discoveryClient in com.controller.DcController required a bean of type 'com.netflix.discovery.DiscoveryClient' that could not be found."

解决方案:

Discovery的包有两个,导入 org.springframework.cloud.client.discovery.DiscoveryClient才是正确的。 


posted on 2018-09-11 15:31  乐之者v  阅读(4869)  评论(1编辑  收藏  举报

导航