title: An error happened during template parsing (template: "class path resource [templates/hello.html]
body: <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang=&quot;en&quot;
         xmlns:th=&quot;http://www.w3.org/1999/xhtml&quot;
        xmlns:th=&quot;http://thymeleaf.org&quot;&gt;
  &lt;head&gt;
  
      &lt;title&gt;Hello Spring Boot&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;h2 th:text=&quot;${message}&quot;&gt;&lt;/h2&gt;
  &lt;h1&gt;Welcome to Spring Boot with Intellij IDEA&lt;/h1&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>Above This is my HTML Code which I am getting error code</p>
  <pre><code>  Mon Jan 04 00:24:01 EST 2021
  There was an unexpected error (type=Internal Server Error, status=500).
  An error happened during template parsing (template: &quot;class path resource [templates/hello.html]&quot; - line 4, col 7)
  org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: &quot;class path resource [templates/hello.html]&quot; - line 4, col 7)
      at org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parse(AbstractMarkupTemplateParser.java:239)``
  </code></pre>
  <p>These are the solutions I have tried.</p>
  <p>I did not bother putting the un-important parts which are the first 3 line that are giving me errors.</p>
  <p>I added</p>
  <pre><code>xmlns:th=&quot;http://thymeleaf.org&quot; 
  </code></pre>
  <p>and even</p>
  <pre><code>xmlns:th=&quot;https://www.thymeleaf.org&quot;
  </code></pre>
  <p>as well as</p>
  <pre><code>xmlns:th=&quot;http://www.thymeleaf.org&quot;
  </code></pre>
  <p>none of the three above have worked</p>
  <p>I have have changed my controller around a bit on the java side which looks the code below</p>
  <pre><code>    @Controller
  public class WebController {
      @GetMapping(&quot;/hello&quot;)
      public String sayHello(HttpServletRequest request){
  
          System.out.println(&quot;Saying hello world Spring Boot....&quot;);
          request.setAttribute(&quot;message&quot;, &quot;Greetings&quot;);
          return &quot;hello&quot;;
      }
  }
  </code></pre>
  <p>This error is unclear to me, I believed it was something on my end but, sometimes it is possible that you must start the project from scratch in order to get things working again.</p>