Spring Boot can't render Thymeleaf view properly
<p>I'm following this <a href="https://spring.io/guides/gs/securing-web/" rel="nofollow noreferrer">Spring Security guide</a>, and I have already reached the section called <em>Create an unsecured web application</em>. At the end of that section, this is stated:   </p>

<blockquote>
  <p>At this point, you could jump ahead to Make the application executable
  and run the application without having to login to anything.</p>
  
  <p>With the base simple web application created, you can add security to
  it.</p>
</blockquote>

<p>I tried to follow the steps described in <em>Make the application executable</em>, to be able to create an unsecured version of the application. However, the views aren't processed properly.<br>
For example, if I navigate to <code>http://localhost:8080/home</code> I get this error:</p>

<pre><code>Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Thu Jan 14 20:49:56 ART 2016
There was an unexpected error (type=Not Found, status=404).
No message available
</code></pre>

<p><a href="https://stackoverflow.com/questions/25330084/spring-simply-rendering-an-html-page">I found this question</a> saying I should add Thymeleaf's dependency, <a href="https://stackoverflow.com/questions/29782915/spring-boot-jsp-404">and this other one</a> saying I should add jasper and jslt, but both of them didn't work. Then, I found <a href="https://github.com/spring-projects/spring-boot/issues/1542" rel="nofollow noreferrer">this issue</a>, saying that I should copy my resources from <code>src/main/resources/templates</code> to <code>src/main/resources/static</code>.<br>
Doing so does a little change: navigating to <code>http://localhost:8080/home.html</code> renders the html, but the view is not proccessed, so the link is not generated.</p>

<p>This is my <code>pom.xml</code>:</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/maven-v4_0_0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;com.github.juanmougan.samples&lt;/groupId&gt;
    &lt;artifactId&gt;spring-security&lt;/artifactId&gt;
    &lt;!-- &lt;packaging&gt;jar&lt;/packaging&gt; --&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
    &lt;name&gt;spring-security&lt;/name&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.3.1.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-thymeleaf&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.apache.tomcat.embed&lt;/groupId&gt;
            &lt;artifactId&gt;tomcat-embed-jasper&lt;/artifactId&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
            &lt;artifactId&gt;jstl&lt;/artifactId&gt;
        &lt;/dependency&gt;
    &lt;/dependencies&gt;

    &lt;properties&gt;
        &lt;java.version&gt;1.8&lt;/java.version&gt;
    &lt;/properties&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;repositories&gt;
        &lt;repository&gt;
            &lt;id&gt;spring-releases&lt;/id&gt;
            &lt;name&gt;Spring Releases&lt;/name&gt;
            &lt;url&gt;https://repo.spring.io/libs-release&lt;/url&gt;
        &lt;/repository&gt;
    &lt;/repositories&gt;
    &lt;pluginRepositories&gt;
        &lt;pluginRepository&gt;
            &lt;id&gt;spring-releases&lt;/id&gt;
            &lt;name&gt;Spring Releases&lt;/name&gt;
            &lt;url&gt;https://repo.spring.io/libs-release&lt;/url&gt;
        &lt;/pluginRepository&gt;
    &lt;/pluginRepositories&gt;
&lt;/project&gt;
</code></pre>

<p>My MVC config class:</p>

<pre><code>package com.github.juanmougan.samples;

import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * Configures Spring MVC and sets up view controllers to expose the templates.
 * 
 * @author juanma
 *
 */
public class MvcConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/home").setViewName("home");
        registry.addViewController("/").setViewName("home");
        registry.addViewController("/hello").setViewName("hello");
        registry.addViewController("/login").setViewName("login");
    }

}
</code></pre>

<p>And the template: </p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"&gt;
    &lt;head&gt;
        &lt;title&gt;Hello World!&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;h1&gt;Hello world!&lt;/h1&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Any ideas why the templates aren't being processed properly?<br>
Thanks in advance</p>

<p><strong>EDIT</strong>: Added the missing <code>Application</code> class.</p>

<pre><code>package com.github.juanmougan.samples;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class Application {

    public static void main(String[] args) throws Throwable {
        SpringApplication.run(Application.class, args);
    }

}
</code></pre>