title: Spring-boot and Thymeleaf not proecssing templates
body: <p>I have an <a href="https://github.com/jetforme/spring-hoa" rel="noreferrer">app</a> which is a simplified version of the Spring Bookmark tutorial. In it, Controllers are annotated with <code>@RestController</code> and the app only returns JSON.</p>
  
  <p>I've added to mine the ability to return HTML via Thymeleaf templates. My templates are being returned, but they don't seem to be processed by Thymeleaf. I'm using spring-boot, and I've <code>spring-boot-starter-thymeleaf</code> to my <code>build.gradle</code> <a href="https://github.com/JetForMe/spring-hoa/blob/master/build.gradle" rel="noreferrer">file</a>, but that doesn't seem to be enough.</p>
  
  <p>For example, here's a simple controller for the root:</p>
  
  <pre><code>package com.latencyzero.hoa;
  
  import org.springframework.stereotype.Controller;
  
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  import org.springframework.web.bind.annotation.RestController;
  import org.springframework.web.servlet.ModelAndView;
  
  
  
  @Controller
  @RequestMapping("/")
  class
  MainController
  {
      @RequestMapping(method = RequestMethod.GET)
      ModelAndView
      index()
      {
          ModelAndView mav = new ModelAndView("index");
          mav.addObject("version", "0.1");
          return mav;
      }
  }
  </code></pre>
  
  <p>and <code>src/main/resources/templates/index.html</code>:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"/&gt;
      &lt;title&gt;HOA v${version}&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;h1&gt;HOA v${version}&lt;/h1&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Results in the following page being rendered:</p>
  
  <p><a href="https://i.stack.imgur.com/dW1Iv.png" rel="noreferrer"><img src="https://i.stack.imgur.com/dW1Iv.png" alt="enter image description here"></a></p>
  
  <p>The examples I've found suggest this is all I need to do, but it's not working. Do I need some additional configuration annotations somewhere?</p>
  
  <p>Thanks.</p>