Better handling of anonymously accessible endpoints

Shares the /health endpoint request mapping between security config
and MVC dispatcher. Generalizes so that instead of a marker
interface (AnonymouslyAccessibleMvcEndpoint), an MvcEndpoint
signals that it wants to control its own access rules by adding
a Principal to the @RequestMapping method parameters (more @MVC).

Fixes gh-2015 slightly differently
This commit is contained in:
Dave Syer
2014-11-28 06:33:30 +00:00
parent 2ce057ca96
commit 3c1e48c89a
9 changed files with 99 additions and 42 deletions

View File

@@ -69,5 +69,8 @@ public class EndpointsPropertiesSampleActuatorApplicationTests {
assertEquals(HttpStatus.OK, entity.getStatusCode());
assertTrue("Wrong body: " + entity.getBody(),
entity.getBody().contains("\"status\":\"UP\""));
System.err.println(entity.getBody());
assertTrue("Wrong body: " + entity.getBody(),
entity.getBody().contains("\"hello\":\"world\""));
}
}