mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Fix deprecation warnings
See gh-27383
This commit is contained in:
parent
ac668dd813
commit
8259f15451
@ -19,8 +19,8 @@ package smoketest.jetty10;
|
|||||||
import javax.net.ssl.SSLContext;
|
import javax.net.ssl.SSLContext;
|
||||||
|
|
||||||
import org.apache.hc.client5.http.async.methods.SimpleHttpRequest;
|
import org.apache.hc.client5.http.async.methods.SimpleHttpRequest;
|
||||||
import org.apache.hc.client5.http.async.methods.SimpleHttpRequests;
|
|
||||||
import org.apache.hc.client5.http.async.methods.SimpleHttpResponse;
|
import org.apache.hc.client5.http.async.methods.SimpleHttpResponse;
|
||||||
|
import org.apache.hc.client5.http.async.methods.SimpleRequestBuilder;
|
||||||
import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient;
|
import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient;
|
||||||
import org.apache.hc.client5.http.impl.async.HttpAsyncClients;
|
import org.apache.hc.client5.http.impl.async.HttpAsyncClients;
|
||||||
import org.apache.hc.client5.http.ssl.ClientTlsStrategyBuilder;
|
import org.apache.hc.client5.http.ssl.ClientTlsStrategyBuilder;
|
||||||
@ -61,7 +61,7 @@ public class Jetty10Http2OverTlsTests {
|
|||||||
try (CloseableHttpAsyncClient http2Client = HttpAsyncClients.customHttp2().setTlsStrategy(tlsStrategy)
|
try (CloseableHttpAsyncClient http2Client = HttpAsyncClients.customHttp2().setTlsStrategy(tlsStrategy)
|
||||||
.build()) {
|
.build()) {
|
||||||
http2Client.start();
|
http2Client.start();
|
||||||
SimpleHttpRequest request = SimpleHttpRequests.get("https://localhost:" + this.port);
|
SimpleHttpRequest request = SimpleRequestBuilder.get("https://localhost:" + this.port).build();
|
||||||
request.setBody("Hello World", ContentType.TEXT_PLAIN);
|
request.setBody("Hello World", ContentType.TEXT_PLAIN);
|
||||||
SimpleHttpResponse response = http2Client.execute(request, new FutureCallback<SimpleHttpResponse>() {
|
SimpleHttpResponse response = http2Client.execute(request, new FutureCallback<SimpleHttpResponse>() {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user