Fix index.html root path forwarding

Fix automatic '/' -> 'index.html' forwarding to also work when a
`server.servlet-path` property is set.

Fixes gh-2351
This commit is contained in:
Phillip Webb 2015-02-24 18:27:44 -08:00
parent 0484e5cb4d
commit cdf785a8d1

View File

@ -281,7 +281,7 @@ public class WebMvcAutoConfiguration {
// Ignore
}
// Use forward: prefix so that no view resolution is done
registry.addViewController("/").setViewName("forward:/index.html");
registry.addViewController("/").setViewName("forward:index.html");
return;
}
}