This article is a mirror article of machine translation, please click here to jump to the original article.

View: 33878|Reply: 1

[Source] Spring Cloud Gateway cannot find a service solution using nacos

[Copy link]
Posted on 2021-7-18 16:33:22 | | | |
Use Spring Cloud Gateway with nacos to find the address based on the service name, and then reverse proxy to the specific microservice interface.

The error is always as follows:

GatewayExceptionHandler: [GateWay Exception], RequestPath: /itsvse/xxx/test1, ExceptionMessage: 503 SERVICE_UNAVAILABLE "Unable to find instance for itsvse"



Through the NACOS web interface, you can see that the microservice has been registered on NACOS, but the gateway prompts that the service name cannot be found.



The NACOS gateway-routes.json configuration file is as follows:

solution

Spring Cloud's original client load balancing solution, Ribbon, has been deprecated and replaced by Spring Cloud LoadBalancer.

The pom introduces dependencies, as follows:

(End)





Previous:The space footprint of each table in SQL Server database
Next:.NET/C# Load Test NBomber Simple Tutorial
Posted on 2022-7-16 20:43:57 |
Thanks for sharing
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com