Accessing Model attributes in Thymleaf and Spring boot
<p>I am learning to use thymeleaf templates for a project I am completing and seem to be missing something. </p>

<p>I am trying to create a very simple Hello type app, here is my code (note I am using groovy):</p>

<p>Controller: </p>

<pre><code>@Controller
class TestController {
  @RequestMapping("/")
  String homePage(@RequestParam("name") String name, ModelAndView modelAndView){
    modelAndView.addObject("name", name)
    return "home"
  }
}
</code></pre>

<p>home.html:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang="en" xmlns:th="http://www.thymeleaf.org"&gt;
&lt;head&gt;
    &lt;meta charset="UTF-8" /&gt;
    &lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;h1&gt;Hello&lt;/h1&gt;
    &lt;p th:text="${name}" /&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>What have I missed?  I just get "Hello" and nothing else when I hit:</p>

<p><a href="http://localhost:8080/app-0.0.1-SNAPSHOT/?name=Sam" rel="nofollow">http://localhost:8080/app-0.0.1-SNAPSHOT/?name=Sam</a></p>