title: Thymeleaf won't fetch pages
body: <p>this is my Spring Boot with Thymeleaf setup.</p>
  
  <p>pom.xml</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-thymeleaf&lt;/artifactId&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>ThymeleafConfig</p>
  
  <pre><code>@Configuration
  public class ThymeleafConfig {
  
      @Bean
      public ServletContextTemplateResolver templateResolver() {
          ServletContextTemplateResolver resolver = new ServletContextTemplateResolver();
          resolver.setPrefix("/templates/");
          resolver.setSuffix(".html");
          resolver.setTemplateMode("LEGACYHTML5");
          resolver.setOrder(1);
          return resolver;
      }
  }
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>@RestController
  public class WebController {
  
      @RequestMapping("")
      public String index(){
          return "index";
      }
  }
  </code></pre>
  
  <p>Index.html is located in src/main/resources/templates.</p>
  
  <p>But when localhost:8080 is called only "index" string is rendered. Index.html is not fetched. What could be the problem?</p>