discoveryClient怎么注入,instance信息怎么获得

获取instance信息  
 
[code] @Autowired
DiscoveryClient discoveryClient; (这个到底怎么注入,,bean怎么写)

public List<ServiceInstance> serviceUrl(String service) {
List<ServiceInstance> instances = discoveryClient.getInstances(service);
return instances;
}




[/code]
已邀请:

simon105 - 啊啊啊啊

赞同来自:

搞错方向了。。实际是import错包了/

要回复问题请先登录注册