title: Spring Boot, static resources and mime type configuration
body: <p>I'm facing a Spring Boot configuration issue I can't deal with...
  I'm trying to build an HelloWorld example for HbbTV with Spring Boot, so I need to serve my "index.html" page with mime-type="application/vnd.hbbtv.xhtml+xml"</p>
  
  <p>my index.html will be accessed as a static page, for instance <a href="http://myserver.com/index.html?param=value" rel="noreferrer">http://myserver.com/index.html?param=value</a>.</p>
  
  <p>with the following code, no matter how hard I try, I get a text/html content type.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE html PUBLIC "-//HbbTV//1.1.1//EN" "http://www.hbbtv.org/dtd/HbbTV-1.1.1.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
  &lt;head&gt;
      &lt;title&gt;MyApp HBBTV&lt;/title&gt;
      &lt;meta http-equiv="content-type" content="Content-Type: application/vnd.hbbtv.xhtml+xml; charset=UTF-8" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
  ...
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>So I tried to add a "home()" endpoint into a @Controller to force the correct mime-type, and that works. </p>
  
  <pre><code>@RestController
  public class HbbTVController {
  
      @RequestMapping(value = "/hbbtv", produces = "application/vnd.hbbtv.xhtml+xml")
      String home() {
          return "someText";
      }
  ...
  }
  </code></pre>
  
  <p>"That works" mean the jetty server serves me a html file with the correct content-type containing the test someText. </p>
  
  <p>My next try were to replace the @RestController by @Controller (same <strong><em>produce</em></strong> config), and replace "someText" by <strong><em>index.html</em></strong></p>
  
  <pre><code>@Controller
  public class HbbTVController {
  
      @RequestMapping(value = "/hbbtv", produces = "application/vnd.hbbtv.xhtml+xml")
      String home() {
          return "index.html";
      }
  ...
  }
  </code></pre>
  
  <p>Well, it serves my index.html correctly, but the Content-Type is wrong : text/html instead of application/vnd.hbbtv.xhtml+xml.
  Furthermore, I don't want to access to myserver.com/hbbtv to get index.html, but directly to myserver.com/index.html.</p>
  
  <p>How could I do that ?</p>
  
  <p>Thanks...</p>