【问题现象】
在使用Feign进行服务见API调用时,出现如下问题:
[503] during [GET] to [http://xxx-service/test/get?name=xxx]
[TestServicesApi#get(String)]: [Load balancer does not contain an instance for the service server-service]
【原因】
请求被拒绝,服务端没有找到对应API服务,可能的原因是请求的“xxx-service”域名(即服务名称)和服务的application.name不一致导致
【解决】
将服务端API接口注解@FeignClient中name改为application.name