Move all actuators under /application
Context path can be configured via `management.context-path`. Closes gh-6886
This commit is contained in:
@@ -105,7 +105,7 @@ public class SampleMethodSecurityApplicationTests {
|
||||
|
||||
@Test
|
||||
public void testManagementProtected() throws Exception {
|
||||
ResponseEntity<String> entity = this.restTemplate.getForEntity("/beans",
|
||||
ResponseEntity<String> entity = this.restTemplate.getForEntity("/application/beans",
|
||||
String.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
|
||||
}
|
||||
@@ -116,7 +116,7 @@ public class SampleMethodSecurityApplicationTests {
|
||||
"admin", "admin");
|
||||
this.restTemplate.getRestTemplate().getInterceptors().add(basicAuthInterceptor);
|
||||
try {
|
||||
ResponseEntity<String> entity = this.restTemplate.getForEntity("/beans",
|
||||
ResponseEntity<String> entity = this.restTemplate.getForEntity("/application/beans",
|
||||
String.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
|
||||
}
|
||||
@@ -132,7 +132,7 @@ public class SampleMethodSecurityApplicationTests {
|
||||
"user", "user");
|
||||
this.restTemplate.getRestTemplate().getInterceptors().add(basicAuthInterceptor);
|
||||
try {
|
||||
ResponseEntity<String> entity = this.restTemplate.getForEntity("/beans",
|
||||
ResponseEntity<String> entity = this.restTemplate.getForEntity("/application/beans",
|
||||
String.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.FORBIDDEN);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user