From e472e7cccaba286ce970cce691ebaf61599a0e99 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Sat, 22 Mar 2014 14:20:53 +0000 Subject: [PATCH] Use forward:/index.html for home page Fixes gh-549 --- .../boot/autoconfigure/web/WebMvcAutoConfiguration.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration.java index 9a10a1e0e00..49be49de5f9 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration.java @@ -238,7 +238,8 @@ public class WebMvcAutoConfiguration { catch (IOException ex) { // Ignore } - registry.addViewController("/").setViewName("/index.html"); + // Use forward: prefix so that no view resolution is done + registry.addViewController("/").setViewName("forward:/index.html"); return; } }