Field ribbonLoadBalancerClient in ... required a a bean of type ... that could not be found.

Description:

Field ribbonLoadBalancerClient in com.hao.learning.consumer.controller.ConsumerController required a bean of type 'org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient' that could not be found.


Action:

Consider defining a bean of type 'org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient' in your configuration.

解决方法:   

   @Autowired
    private RibbonLoadBalancerClient ribbonLoadBalancerClient;

改成:

   @Autowired
    private LoadBalancerClient ribbonLoadBalancerClient;

发布了388 篇原创文章 · 获赞 105 · 访问量 31万+

猜你喜欢

转载自blog.csdn.net/haoranhaoshi/article/details/104485123