当前位置:   article > 正文

consul+feign调用报错Caused by: com.netflix.client.ClientException: Load balancer does not have available_netflix client 调用consul

netflix client 调用consul

报错的原因是feign默认使用ribbon作为负载均衡调用的:

 

我的feign调用类如下:

  

  1. package com.wm.blog_admin.feign;
  2. import com.wm.blog_admin.feign.factory.PictureClientFallbackFactory;
  3. import com.wm.blog_common.constatnt.CommonConstant;
  4. import com.wm.blog_common.domain.TFileDO;
  5. import com.wm.blog_common.result.Result;
  6. import com.wm.blog_config.config.CustomFeignConfig;
  7. import org.springframework.cloud.openfeign.FeignClient;
  8. import org.springframework.web.bind.annotation.GetMapping;
  9. import org.springframework.web.bind.annotation.PathVariable;
  10. /***
  11. * @ClassName: PictureFeignClient
  12. * @Description: picture feign调用
  13. * @Author: wm_yu
  14. * @Create_time: 16:39 2020-3-26
  15. */
  16. @FeignClient(value = CommonConstant.PIC
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/84697
推荐阅读
相关标签
  

闽ICP备14008679号