最初的错误是:
java.lang.RuntimeException: java.lang.ClassNotFoundException: org.glassfish.jersey.client.JerseyClientBuilder
添加以下依赖项解决了初始错误
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<scope>provided</scope>
</dependency>
然后我们收到了第二个错误:
java.lang.NoClassDefFoundError: org/apache/http/conn/ssl/X509HostnameVerifier
添加以下依赖项解决了第二个(X509HostnameVerifier)错误:
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<scope>provided</scope>
</dependency>
如果还有这样的错误:
java.lang.ClassNotFoundException: org.apache.http.params.HttpParams
还需要依赖:
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>版本号</version>
</dependency>
|