This commit is contained in:
Phillip Webb
2017-11-15 11:59:09 -08:00
parent cf485ce144
commit f647f5689f
13 changed files with 38 additions and 32 deletions

View File

@@ -41,6 +41,7 @@ public class SampleJettySslApplicationTests {
@Autowired
private TestRestTemplate restTemplate;
@Autowired
private AbstractConfigurableWebServerFactory webServerFactory;
@@ -55,4 +56,5 @@ public class SampleJettySslApplicationTests {
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(entity.getBody()).isEqualTo("Hello World");
}
}

View File

@@ -52,10 +52,13 @@ public class SampleTomcatTwoConnectorsApplicationTests {
@LocalServerPort
private int port;
@Autowired
private Ports ports;
@Autowired
private TestRestTemplate restTemplate;
@Autowired
private AbstractConfigurableWebServerFactory webServerFactory;

View File

@@ -31,13 +31,7 @@ public class SampleController {
@GetMapping("/async")
public Callable<String> helloWorldAsync() {
return new Callable<String>() {
@Override
public String call() throws Exception {
return "async: Hello World";
}
};
return () -> "async: Hello World";
}
}