Update Actuator to use the new endpoint infrastructure

This commit migrates the Actuator onto the new endpoint infrastruture.
In addition to the existing support for accessing the endpoints via
JMX and HTTP using Spring MVC, support for access via HTTP using
Jersey and WebFlux has been added. This includes using a separate
management port where we now spin up an additional, appropriately
configured servlet or reactive web server to expose the management
context on a different HTTP port to the main application.

Closes gh-2921
Closes gh-5389
Closes gh-9796
This commit is contained in:
Andy Wilkinson
2017-07-12 09:08:43 +01:00
parent e92cb115e3
commit ee16332745
195 changed files with 7762 additions and 11963 deletions

View File

@@ -185,7 +185,8 @@ public class SampleActuatorApplicationTests {
@Test
public void traceWithParameterMap() throws Exception {
this.restTemplate.getForEntity("/application/health?param1=value1", String.class);
this.restTemplate.withBasicAuth("user", getPassword())
.getForEntity("/application/health?param1=value1", String.class);
@SuppressWarnings("rawtypes")
ResponseEntity<List> entity = this.restTemplate
.withBasicAuth("user", getPassword())

View File

@@ -62,8 +62,8 @@ public class ServletPathInsecureSampleActuatorApplicationTests {
@Test
public void testMetricsIsSecure() throws Exception {
@SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = this.restTemplate.getForEntity("/spring//application/metrics",
Map.class);
ResponseEntity<Map> entity = this.restTemplate
.getForEntity("/spring/application/metrics", Map.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
}