在開發時能夠借鑑java
//post,delete,put請求在admin server處理超時狀況下不重試 private boolean canRetry(Throwable e, HttpMethod method) { Throwable nestedException = e.getCause(); if (method == HttpMethod.GET) { return nestedException instanceof SocketTimeoutException || nestedException instanceof HttpHostConnectException || nestedException instanceof ConnectTimeoutException; } else { return nestedException instanceof HttpHostConnectException || nestedException instanceof ConnectTimeoutException; } }