Spring Boot MVC, not returning my view
<p>I have problem with Spring Boot MVC and views.
When I go on localhost:9090, I've got page with "index" written and not my index.html page like view.
Can you tell my what the problem is ?
Thanks in advance.</p>

<p><strong>pom.xml</strong></p>

<pre><code>&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.4.2.RELEASE&lt;/version&gt;
&lt;/parent&gt;

&lt;properties&gt;
    &lt;java.version&gt;1.8&lt;/java.version&gt;
&lt;/properties&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-data-rest&lt;/artifactId&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-data-mongodb&lt;/artifactId&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
        &lt;artifactId&gt;spring-data-rest-hal-browser&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;
</code></pre>

<p><strong>MainController</strong></p>

<pre><code>import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/")
public class MainController {

    @RequestMapping(method = RequestMethod.GET)
    public String index() {
        return "index";
    }
}
</code></pre>

<p><strong>Application.yml</strong> src/main/resources/application.yml</p>

<pre><code>spring:
    data:
        rest:
            basePath: /api
    mvc:
        view:
            prefix: /webapp/
            suffix: .html

server:
    port: 9000
</code></pre>

<p><strong>My index.html</strong> is in : src/main/webapp/index.html</p>

<p>Maybe useless but : 
<strong>Application.java</strong></p>

<pre><code>@SpringBootApplication
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}
</code></pre>

<p><strong><em>UPDATE:</em></strong>
I put index.html in src/static/index.html
Ok but I have same problem with : </p>

<p><strong>I add in my pom</strong>:</p>

<pre><code> &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;
</code></pre>

<p><strong>In map.html</strong></p>

<pre><code>&lt;!DOCTYPE HTML&gt;
&lt;html xmlns:th="http://www.thymeleaf.org"&gt;
&lt;head&gt;

    &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
&lt;/head&gt;

&lt;body&gt;
 &lt;p&gt;this is the map&lt;/p&gt;
&lt;/body&gt;
</code></pre>

<p><strong>MapController</strong></p>

<pre><code>@Controller
@RequestMapping("/map")
public class MapController {

    @RequestMapping(method = RequestMethod.GET)
    public String index() {
        return "map";
    }
}
</code></pre>

<p>Map.html is in wepapp. 
When I go to localhost:9090/map, I've the following error on chrome :</p>

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

<p>And in eclipse I've got this error : </p>

<pre><code>Error resolving template "map", template might not exist or might not be accessible by any of the configured Template Resolvers
</code></pre>

<p>Map maybe should be in webapps/templates? I really dont know.</p>

<p><strong>SOLUTION : Thanks guys !</strong> 
<strong>Controller</strong></p>

<pre><code>@Controller
@RequestMapping("/map")
public class MapController {

    @RequestMapping(method = RequestMethod.GET)
    public String index() {
        return "map";
    }
}
</code></pre>

<p>And the views must be in src/main/resources/templates/map.html and NOT in wepapp/templates/map.html
<strong>map.html</strong></p>

<pre><code>&lt;!DOCTYPE HTML&gt;
&lt;html xmlns:th="http://www.thymeleaf.org"&gt;
&lt;head&gt;
    &lt;title&gt;Bienvenue sur le portail historique intéractif - Amysto&lt;/title&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
&lt;/head&gt;
&lt;body&gt;

    &lt;div id="main"&gt;
        &lt;div class="row"&gt;
            &lt;p&gt;Il faut mettre la map ici&lt;/p&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/body&gt;

&lt;script src="./foundation/js/vendor/jquery.js"&gt;&lt;/script&gt;
&lt;script src="./js/menu.js"&gt;&lt;/script&gt;


&lt;/html&gt;
</code></pre>

<p>I can't upvote so I let you do guys :)</p>