Compare commits
2 Commits
0b7a644ed0
...
60a8739b06
Author | SHA1 | Date |
---|---|---|
|
60a8739b06 | |
|
348f0caf2d |
|
@ -27,6 +27,7 @@ public class HttpClientConfig {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public OkHttpClient okHttpClient() throws Exception {
|
public OkHttpClient okHttpClient() throws Exception {
|
||||||
|
|
||||||
//调用nifi接口正常情况不会超过60秒的,目前遇到的接口1秒以内调用完毕
|
//调用nifi接口正常情况不会超过60秒的,目前遇到的接口1秒以内调用完毕
|
||||||
return new OkHttpClient.Builder().sslSocketFactory(createTrustAllSslSocketFactory(), createTrustAllTrustManager()).hostnameVerifier((hostname, session) -> true).connectTimeout(60, TimeUnit.SECONDS) // 连接超时时间
|
return new OkHttpClient.Builder().sslSocketFactory(createTrustAllSslSocketFactory(), createTrustAllTrustManager()).hostnameVerifier((hostname, session) -> true).connectTimeout(60, TimeUnit.SECONDS) // 连接超时时间
|
||||||
.readTimeout(60, TimeUnit.SECONDS) // 读取超时时间
|
.readTimeout(60, TimeUnit.SECONDS) // 读取超时时间
|
||||||
|
|
Loading…
Reference in New Issue