Problems encountered by spring-zuul

Recently, the following errors occurred when I was studying spring-cloud and zuul components:
Caused by: com.netflix.client.ClientException: Load balancer does not have available server for client: zuul-server The

solution is to add in the pom file
      	<dependency>
      		<groupId>org.springframework.cloud</groupId>
      		<artifactId>spring-cloud-starter-eureka</artifactId>
      	</dependency>


What I tested is to call the eureka registered service through zuul. The online articles are incomplete and fill in the missing parts. You can refer to the online article and add this part to call the eureka service through zuul.

My example code is on git, not much to say that everything is in the code.
Address: https://github.com/leozhang123/springcloud-example.git

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326747584&siteId=291194637
Recommended