title: Cannot display the index.html page in Spring boot
body: <p>I tried to create a simple spring boot application</p>
  
  <p>I created spring boot application class, configuration class, controller class and the index.html.</p>
  
  <p>I added Thymeleaf dependencies and put html page under resources folder (\src\main\resources\templates\index.html)</p>
  
  <p>But when I run the application it gives an error </p>
  
  <pre><code>org.thymeleaf.exceptions.TemplateInputException:
  Error resolving template "index.html", template might not exist or might not be accessible by any of the configured Template Resolvers
  </code></pre>
  
  <p>Please give me a solution.</p>
  
  <pre><code>@SpringBootApplication
  @ComponentScan(basePackages = {"com.mail"})
  public class SpringBootWebApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(SpringBootWebApplication.class, args);
      }
  }
  </code></pre>
  
  <p>Controller class</p>
  
  <pre><code>@RestController
  public class IndexController {
  
      @RequestMapping(value="/", method = RequestMethod.GET)
      String index(){
          System.out.println("..............hit");
          return "index";
      }
  </code></pre>
  
  <p>WebConfiguration for Thymeleaf</p>
  
  <pre><code>@Configuration
  public class WebConfiguration extends WebMvcConfigurerAdapter{
      @Override
      public void addViewControllers(ViewControllerRegistry registry) {
          registry.addViewController("/").setViewName("index.html");
          registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
      }
  }
  </code></pre>
  
  <p>index.html page</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns:th="http://www.thymeleaf.org"&gt;
  &lt;head lang="en"&gt;
      &lt;title&gt;Spring Framework&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h1&gt; Hello Spring Boot &lt;/h1&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>