Merge branch '1.2.x'
This commit is contained in:
@@ -54,8 +54,8 @@ public class SampleJettySslApplicationTests {
|
||||
@Test
|
||||
public void testHome() throws Exception {
|
||||
SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory(
|
||||
new SSLContextBuilder().loadTrustMaterial(null,
|
||||
new TrustSelfSignedStrategy()).build());
|
||||
new SSLContextBuilder()
|
||||
.loadTrustMaterial(null, new TrustSelfSignedStrategy()).build());
|
||||
|
||||
HttpClient httpClient = HttpClients.custom().setSSLSocketFactory(socketFactory)
|
||||
.build();
|
||||
@@ -63,8 +63,8 @@ public class SampleJettySslApplicationTests {
|
||||
TestRestTemplate testRestTemplate = new TestRestTemplate();
|
||||
((HttpComponentsClientHttpRequestFactory) testRestTemplate.getRequestFactory())
|
||||
.setHttpClient(httpClient);
|
||||
ResponseEntity<String> entity = testRestTemplate.getForEntity(
|
||||
"https://localhost:" + this.port, String.class);
|
||||
ResponseEntity<String> entity = testRestTemplate
|
||||
.getForEntity("https://localhost:" + this.port, String.class);
|
||||
assertEquals(HttpStatus.OK, entity.getStatusCode());
|
||||
assertEquals("Hello World", entity.getBody());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user