Serving single html page with Spring Boot
<p>I'm developing a simple Spring Boot app that uses Spring Boot Web. I placed my index.html into the templates subdirectory of the resources directory as per the Spring Boot docs. I've defined inside the application.properties file:</p>

<p>spring.mvc.view.prefix=classpath:/templates/</p>

<p>spring.mvc.view.suffix=.html</p>

<p>My WebMvcConfigurerAdapter looks like this:</p>

<pre><code>@Configuration
@EnableWebMvc
public class WebMvcConfig extends WebMvcConfigurerAdapter{
@Override
public void addViewControllers(ViewControllerRegistry registry) {
    registry.addViewController("/").setViewName("index");
    super.addViewControllers(registry);
}   
}
</code></pre>

<p>My problem is I cant seem to serve index.html at <a href="http://localhost:8080" rel="nofollow">http://localhost:8080</a>.
I get the following error: 
"javax.servlet.ServletException: Could not resolve view with name 'index' in servlet with name 'dispatcherServlet'".</p>

<p>How can I fix this without the use of a controller?</p>

<p>Kind regards,
Dave</p>