OpenFeign默认等待一秒钟,超过后报错
Request processing failed; nested exception is feign.RetryableException: connect timed out executing GET http://CLOUD-PAYMENT-SERVICE/payment/getTimeout/1] with root cause
由于OpenFeign底层是由Ribbon实现的,所以我们只要修改Ribbon的配置即可
ribbon:
ReadTimeout: 5000
ConnectTimeout: 5000
再次实验就可以正常访问了