feignClient 忽略https请求问题
2021-04-24 05:27
标签:etc code 忽略 issue err tps new rust ext feignClient 忽略https请求问题 标签:etc code 忽略 issue err tps new rust ext 原文地址:https://www.cnblogs.com/fqybzhangji/p/12235729.html@Bean
public Client getClient() throws NoSuchAlgorithmException, KeyManagementException {
SSLContext sslContext = SSLContext.getInstance("tls");
final TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {
@Override
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {
}
@Override
public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {
}
@Override
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return new java.security.cert.X509Certificate[]{};
}
}
};
sslContext.init(null, trustAllCerts, new SecureRandom());
return new Client.Default(sslContext.getSocketFactory(), null);
}
feignClient 忽略https请求问题
文章标题:feignClient 忽略https请求问题
文章链接:http://soscw.com/index.php/essay/78802.html