title: Error resolving template "~{fragments/header", template might not exist or might not be accessible by any of the configured Template Resolvers
body: <p>I just tried leaning spring boot.
  I use thymeleaf, </p>
  
  <p>list.html:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns:th="http://www.thymeleaf.org"
        xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
        &gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8" /&gt;
      &lt;title&gt;Thymeleaf in action&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div th:replace="~{fragments/header}:: header"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>header.html:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns:th="http://www.thymeleaf.org"
  xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
        &gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8" /&gt;
      &lt;title&gt;Thymeleaf in action&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div th:fragment="header"&gt;
      header
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Controller :</p>
  
  <pre><code>@RestController
  @RequestMapping("/users")
  public class UserController {
  
      @Autowired
      private UserRepository userRepository;
  
      @GetMapping
      public ModelAndView list(Model model) {
          model.addAttribute("userList", userRepository.listUsers());
          model.addAttribute("title", "account management");
          return new ModelAndView("users/list", "userModel", model);
      }
  }
  </code></pre>
  
  <p>pom file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
           http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;Blog&lt;/groupId&gt;
      &lt;artifactId&gt;Blog&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
  
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;1.5.3.RELEASE&lt;/version&gt;
      &lt;/parent&gt;
  
  
      &lt;dependencies&gt;
          &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;
  
      &lt;/dependencies&gt;
  
  
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  
  
  &lt;/project&gt;
  </code></pre>
  
  <p>when i tried open the localhost:8080/users page</p>
  
  <p>Whitelabel Error Page
  This application has no explicit mapping for /error, so you are seeing this 
  as a fallback.</p>
  
  <p>Tue Mar 20 20:51:11 PDT 2018
  There was an unexpected error (type=Internal Server Error, status=500).
  Error resolving template "header", template might not exist or might not be 
  accessible by any of the configured Template Resolvers (users/list:11)</p>
  
  <p>don't know how to add the header and footer</p>