title: spring-boot-starter-web vs spring-boot-starter-thymeleaf
body: <p>I try understand how spring boot is working with html pages. I started following the guide <a href="https://spring.io/guides/gs/serving-web-content/" rel="nofollow">from spring.io</a>. This guide is showing how to work with html page and view technology Thymeleaf. It has page:</p>
  
  <pre><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>
  
  <p>I have changed it to simple </p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html&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;
      Hello
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And following <a href="http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#getting-started-installation-instructions-for-java" rel="nofollow">spring boot reference documentation</a> changed <code>spring-boot-starter-thymeleaf</code>(that is not needed now) to <code>spring-boot-starter-web</code>, after that I cant see web page. I see result: </p>
  
  <pre><code>There was an unexpected error (type=Not Found, status=404). 
  No message available.
  </code></pre>
  
  <p>When I come back my Gradle dependencies to <code>thymeleaf</code> all works fine.</p>
  
  <p>Controller <code>src/main/java/hello/GreetingController.java</code></p>
  
  <pre><code>package hello;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  
  @Controller
  public class GreetingController {
  
  @RequestMapping("/greeting")
  public String greeting() {
      return "greeting";
  }
  
  }
  </code></pre>
  
  <p>Application <code>src/main/java/hello/Application.java</code></p>
  
  <pre><code>package hello;
  
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  
  @SpringBootApplication
  public class Application {
  
  public static void main(String[] args) {
      SpringApplication.run(Application.class, args);
  }
  
  }
  </code></pre>
  
  <p>Can someone explain me what is difference between <code>web</code> and <code>thymeleaf</code> dependencies for this only HTML page from <code>src/main/resources/templates/greeting.html</code>?</p>