title: Springboot template files are not loaded
body: <p>I am writing my first springboot web app with project structure like below:</p>
  
  <pre><code>---src/main/java
             +com.example.myproject
                                  +--Application.java
             +com.example.myproject.domain
                                  +--Person.java
             +com.example.myproject.web
                                  +--GreetingController.java
  ---src/main/resources
             +static
                   +--css
                   +--js
             +templates
                   +--greeting.html 
  </code></pre>
  
  <p><strong>Aplication.java</strong></p>
  
  <pre><code>package com.example.myproject;
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  
  @SpringBootApplication
  public class Application {
      public static void main(String[] args) {
          SpringApplication app = new SpringApplication(Application.class);
          app.setShowBanner(false);
          app.run(args);
      }
  }
  </code></pre>
  
  <p><strong>GreetingController.java</strong></p>
  
  <pre><code>package com.example.myproject.web;
  
  import org.springframework.ui.Model;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestParam;
  import org.springframework.web.bind.annotation.RestController;
  
  
  @RestController
  public class GreetingController {
  
      @RequestMapping("/greeting")
      public String greeting(@RequestParam(value="name", required=false, defaultValue="World") String name, Model model) {
          model.addAttribute("name", name);
          return "greeting";
      }
  }
  </code></pre>
  
  <p><strong>greeting.html</strong>
  <div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE HTML&gt;
  &lt;html xmlns:th="http://www.thymeleaf.org"&gt;
  &lt;head&gt;
      &lt;title&gt;Getting Started: Serving Web Content&lt;/title&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;p th:text="'Hello, ' + ${name} + '!'" /&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The problem is that when i run the project, and type below URL on web browser</p>
  
  <pre><code>http://localhost:8080/greeting
  </code></pre>
  
  <p>The result only displays this text:  <strong>greeting</strong>  while it should display this text:  <strong>Hello, World!</strong></p>
  
  <p>I have tried to move greeting.html out of templates folder but still not lucky. As i understand, springboot should auto scan the components and load resource files correctly.</p>
  
  <p>Please help to advise on this issue.</p>