Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Case Analysis of Spring Cloud Eureka Client dependency

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "Spring Cloud Eureka Client dependency case analysis". In daily operation, I believe many people have doubts about Spring Cloud Eureka Client dependency case analysis. The editor consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts of "Spring Cloud Eureka Client dependency case analysis". Next, please follow the editor to study!

Set up a SpringCloud project and request other service instances of the Eureka registry through Feign, but the service will not register on Eureka anyway! Later, after careful investigation, it was finally found that it was caused by an error in adding Eureka-Client dependencies, and the solution timed out. Although the use of SpringCloud and SpringBoot highly integrated dependency architecture brings us a lot of convenience, due to the complexity of the internal version, we must read it carefully before using it, otherwise there will be a variety of inexplicable problems and slow down the progress of development.

Does Eureka-Client rely on Li Gui or Li Kui?

Li Gou:

Org.springframework.cloud spring-cloud-netflix-eureka-client

Li Kwai:

Org.springframework.cloud spring-cloud-starter-netflix-eureka-client

The disgusting thing is that these two things can still exist at the same time!

Put a detailed picture:

The problem is solved after replacing the dependency! The service Eureka registered successfully and was called through the instance name.

Tips:

After unable to register on Eureka using spring-cloud-netflix-eureka-client, after adding the dependency of Eureka-Server, the registry miraculously appeared the service we want to register! The problem arises again when I try to communicate between services over Feign.

Com.netflix.client.ClientException: Load balancer does not have available server for client: helloservice

Damn it, my services are obviously registered on Eureka, why can't they communicate with each other?

My Eureka-Server dependencies are as follows:

Org.springframework.cloud spring-cloud-netflix-eureka-server

The real Eureka-Server dependencies are as follows:

Org.springframework.cloud spring-cloud-starter-netflix-eureka-server at this point, the study of "Spring Cloud Eureka Client dependency case analysis" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report