完善:《个人常用Linux命令》

This commit is contained in:
2022-09-01 21:35:19 +08:00
parent f547667256
commit ca424106f6
4 changed files with 118 additions and 19 deletions

View File

@@ -94,6 +94,20 @@ public class FeignConfig {
}
return Logger.Level.FULL;
}
/**
* 解决 javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present
* @return /
*/
@Bean
public Client client() {
try {
SSLContext context = new SSLContextBuilder().loadTrustMaterial(null, (chain, authType) -> true).build();
return new Client.Default(context.getSocketFactory(), new NoopHostnameVerifier());
} catch (Exception e) {
return new Client.Default(null, null);
}
}
}
```