title: Controllers & Filter are initialized but not getting called
body: <p>I'm running very simple Spring Boot application:</p>
  <pre><code>@SpringBootApplication
  public class Application {
  
      public static void main(String[] args) {
          SpringApplication.run(Application.class, args);
      }
  }
  </code></pre>
  <p>I have a simple filter:</p>
  <pre><code>@Component
  public class MyFilter implements Filter {
  
      @Override
      public void init(FilterConfig filterConfig) throws ServletException     {
         // This is getting called ! 
      }
  
      @Override
      public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
          // some logic
          filterChain.doFilter(request, response);
      }
  
      @Override
      public void destroy() {
      }
  }
  </code></pre>
  <p>I'm having a single controller that return an index page:</p>
  <pre><code>@Controller
  public class HomeController {
  
      @RequestMapping(&quot;/&quot;)
      public String index() {
          return &quot;index&quot;;
      }
  
  }
  </code></pre>
  <p>When requesting the index page, my filter is not getting called although I think it should.</p>
  <p>In my logs I see:</p>
  <pre><code>2016-07-18 11:59:51.840  INFO 15623 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'MyFilter' to: [/*]
  </code></pre>
  <p>What am I missing?</p>
  <p>After the comments here I saw that my controller is not getting called as well. So this is not a problem with the filter, but this is a symptom to a bigger problem.</p>
  <p>This is my project structure:</p>
  <pre><code>.
  ├── Dockerfile
  ├── build.gradle
  ├── gradlew
  ├── settings.gradle
  ├── src
  │   ├── main
  │   │   ├── java
  │   │   │   └── com
  │   │   │       └── mypackage
  │   │   │           ├── Application.java
  │   │   │           ├── GreetingController.java
  │   │   │           ├── HomeController.java
  │   │   │           └── MyFilter.java
  │   │   └── resources
  │   │       ├── application.yml
  │   │       └── templates
  │   │           ├── greeting.html
  │   │           └── index.html
  </code></pre>
  <p>I'm building a jar file with <code>gradle</code>:</p>
  <p><code>./gradlew clean build</code></p>
  <p>And running it:</p>
  <p><code>java -jar build/libs/sample-webapp-1.0.0.jar</code></p>
  <p>I'm calling <code>http://localhost:8080</code> and getting the <code>index.html</code> file (probably not going through the controller).</p>
  <p>Spring version is <code>1.3.6-RELEASE</code>.</p>
  <p>Part of my <code>build.gradle</code>:</p>
  <pre><code>buildscript {
      repositories {
          maven {
              url &quot;http://jcenter.bintray.com&quot;
          }
      }
      dependencies {
          classpath(&quot;org.springframework.boot:spring-boot-gradle-plugin:1.3.6.RELEASE&quot;)
      }
  }
  
  dependencies {
          compile(&quot;org.springframework.boot:spring-boot-starter-thymeleaf&quot;)
          compile(&quot;org.springframework.boot:spring-boot-devtools&quot;)
          compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.6.2'
          compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.6.2'
          compile group: 'org.bouncycastle', name: 'bcprov-jdk16', version: '1.46'
          testCompile(&quot;junit:junit&quot;)
  }
  </code></pre>