hostname|HttpClient 访问Https报错hostname in certificate didn't match:

【hostname|HttpClient 访问Https报错hostname in certificate didn't match:】错误:
javax.net.ssl.SSLException:hostname in certificate didn't match:<**.**.****.com> != <*.****.com>
解决办法:
SSLConnectionSocketFactory sslFactory = new SSLConnectionSocketFactory(sslContext,SSLConnectionSocktFactory.ALLOW_ALL_HOSTNAME_VERIFIER);




    推荐阅读