解决:NoClassDefFoundError: org/apache/http/ssl/SSLContexts 深藏阁楼爱情的钟 2022-05-05 13:26 455阅读 0赞 原文:[https://blog.csdn.net/xiehuanhuan1991/article/details/79914581?utm\_source=blogxgwz0][https_blog.csdn.net_xiehuanhuan1991_article_details_79914581_utm_source_blogxgwz0] 之前做微信网页授权时,要访问他的url,于是要有httpclient CloseableHttpClient client = HttpClientBuilder.create().build(); 但是运行时tomcat报错NoClassDefFoundError: org/apache/http/ssl/SSLContexts 解决办法引入依赖: <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpcore</artifactId> <version>4.4</version> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.5.2</version> </dependency> 这里要注意httpcore一定要4.4及以上版本的。 [https_blog.csdn.net_xiehuanhuan1991_article_details_79914581_utm_source_blogxgwz0]: https://blog.csdn.net/xiehuanhuan1991/article/details/79914581?utm_source=blogxgwz0
还没有评论,来说两句吧...