Don't user root path for HAL endpoints

Update LinksMvcEndpoint and HalBrowserMvcEndpoint so that no longer try
to use the `/` context path. Links are now available from `/links` and
the HAL browser is available from `/hal`.

The actuator HAL browser now works with either WebJars or the Spring
Data version. It also now transforms the initial HTML so that the
form is pre-populated with `/links`.

When using Spring Data's HAL browser, the root includes a link to
`/links` with a rel of `actuator`.

See gh-3621
This commit is contained in:
Phillip Webb
2015-08-05 22:17:29 -07:00
parent 44aacd9559
commit 28f32da74f
15 changed files with 310 additions and 264 deletions

View File

@@ -82,7 +82,7 @@ public class HypermediaEndpointDocumentation {
@Test
public void home() throws Exception {
this.mockMvc.perform(get("/").accept(MediaType.APPLICATION_JSON))
this.mockMvc.perform(get("/links").accept(MediaType.APPLICATION_JSON))
.andExpect(status().isOk()).andDo(document("admin"));
}