title: Simple spring boot webapp doesnt work, whitelabel error page
body: <p>I try run my simple "hello world" Spring Boot web application, but it doesn't work, I get "Whitelabel error page" all the time.</p>
  
  <p><strong>My Controller</strong></p>
  
  <pre><code>package com.packt.webapp.controller;
  
  @Controller
  @RequestMapping("/")
  public class HomeController {
  
      public String home(Model model){
          String welcome = new String("Witam");
          model.addAttribute("welcome", welcome);
          return "home";
      }
  }
  </code></pre>
  
  <p><strong>Application.java</strong></p>
  
  <pre><code>package com.packt.webapp.controller;
  
  @Configuration
  @EnableAutoConfiguration
  @ComponentScan
  public class Application {
  
      public static void main(String[] args) throws Exception {
          SpringApplication.run(Application.class, args);
      }
  }
  </code></pre>
  
  <p><strong>home.html</strong></p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
  &lt;html xmlns:th="http://www.thymeleaf.org"&gt;
      &lt;head&gt;
          &lt;title&gt;Test&lt;/title&gt;
          &lt;link rel="stylesheet" th:href="@{/css/style.css}" /&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;h1&gt;Hello&lt;/h1&gt;
          &lt;span th:text="'Message: ' + ${welcome}"&gt;&lt;/span&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>pom.xml</strong></p>
  
  <pre><code>&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;com.packt.webapp&lt;/groupId&gt;
      &lt;artifactId&gt;basket&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&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.1.4.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>What am I doing wrong? I tried change my project structure, was playing with dependencies, nothing helps. Can somebody enlighten me?</p>