確認代碼無誤后,調用出現 connect time out 問題.
因為feign已經集成robbon,hystrix,調用在規定時間內達不到就會報上述錯誤,並且這個規定時間會很短
解決辦法:配置文件加入如下配置: 指的是在調用的一方
#hystrix的超時時間
hystrix:
command:
default:
execution:
timeout:
enabled: true
isolation:
thread:
timeoutInMilliseconds: 30000
#ribbon的超時時間
ribbon:
ReadTimeout: 30000
ConnectTimeout: 30000