入门Spring cloud微服务的常见错误整理

下面方法亲测有效:

1.springcloud ribbon实现负载均衡的时候,提示Request URI does not contain a valid hostname: http://PRODUCT_SERVICE/

参考https://blog.csdn.net/cuiyaoqiang/article/details/79235585

2.spring-boot Autowired DiscoveryClient RestTemplate UnknowHostException

参考

https://stackoverflow.com/questions/36458975/spring-boot-autowired-discoveryclient-resttemplate-unknownhostexception

3.com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect

或者com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server

参考https://www.cnblogs.com/zmblog/p/8777878.html

你可能感兴趣的:(入门Spring cloud微服务的常见错误整理)