“Field discoveryClient in (报错的类名) required a bean of type ‘com.netflix.discovery.DiscoveryClient’ that could not be found.”
原因:Discovery的包有两个,导错了。
解决:删除之前错误的包,导入这个org.springframework.cloud.client.discovery.DiscoveryClient
成功解决:com.netflix.discovery.DiscoveryClient没有找到错误(使用spring cloud框架)解决方案,建议看看
最新推荐文章于 2024-03-18 14:31:07 发布