title: Unable to set my custom favicon.ico in Spring Boot 1.3 or 1.2.5
body: <p>I started a <strong>fresh new project</strong> a couple of days ago using for the first time <strong>FreeMarker</strong> with <strong>Spring Boot 1.3</strong>. However, I'm struggling to display my own favicon. In fact, <strong>it worked well at the very beginning</strong> of the project but since a couple of days ago, it doesn't and I can't find out why. I already get through the three threads on stackoverflow talking about it but none fixed my issue. I searched on Google but I couldn't find any solution.</p>
  
  <h1>How to reproduce</h1>
  
  <p>Trying to get rid of the problem, I've started a new project (Spring 1.2.5 this time) and I got the same issue.
  Using Spring Tool Suite : New &#9658; Spring Starter Project &#9658; then I ticked Web and FreeMarker &#9658; Finish.</p>
  
  <p>Once the project ready, I created <strong>HomeController in demo.web package</strong> with one test function returning "home". I've also created a <strong>home.ftl into src/main/resources/templates</strong> and put two files in <strong>src/main/resources/static</strong> : <strong>demo.png</strong> and <strong>favicon.ico</strong> (I also tried to place it under src/main/resources).</p>
  
  <p>The demo.png is showing correctly but <strong>the favicon.ico is not displayed</strong>. Perhaps I'm doing it horribly wrong as I'm a novice in web development.</p>
  
  <blockquote>
    <p>HomeController.java</p>
  </blockquote>
  
  <pre><code>package demo.web;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  
  @Controller
  public class HomeController {
  
      @RequestMapping(value = "/", method = RequestMethod.GET)
      public String get() {
          return "home";
      }
  }
  </code></pre>
  
  <blockquote>
    <p>home.ftl</p>
  </blockquote>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Demo&lt;/title&gt;
      &lt;link rel="icon" type="image/x-icon" href="/favicon.ico"&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;img src="/demo.png" alt=""&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <blockquote>
    <p>pom.xml</p>
  </blockquote>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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;org.test&lt;/groupId&gt;
      &lt;artifactId&gt;demo&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
      &lt;name&gt;demo&lt;/name&gt;
      &lt;description&gt;Demo project for Spring Boot&lt;/description&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.2.5.RELEASE&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&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-freemarker&lt;/artifactId&gt;
          &lt;/dependency&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-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&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>If you need further information please ask me.
  I thank you all in advance for your help.</p>
  
  <p>Best regards,
  Stilleur</p>
  
  <h1>Edit</h1>
  
  <p>Actually, it looks like Spring Boot overrides every favicon.ico he can found in the resource locations.</p>