title: SpringBoot cannot find handler method
body: <p>I have a basic SpringBoot app. using Spring Initializer, embedded Tomcat, Thymeleaf template engine, and package as an executable JAR file.</p>
  
  <p>this is the main class</p>
  
  <pre><code>@SpringBootApplication
  public class TdkApplication {
      public static void main(String[] args) {
          SpringApplication.run(TdkApplication.class, args);
      }
  }
  </code></pre>
  
  <p>This is a controller</p>
  
  <pre><code>@Controller
  public class MockupIndexController {
      @RequestMapping("/mockup/index")
      public String welcome(Map&lt;String, Object&gt; model) {
          return "mockups/index";
      }
  }
  </code></pre>
  
  <p>This my <code>pom.xml</code></p>
  
  <pre><code> &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-actuator&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-thymeleaf&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
               &lt;groupId&gt;com.tdk.iot.core&lt;/groupId&gt;
              &lt;artifactId&gt;tdk-core&lt;/artifactId&gt;
              &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&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;
  </code></pre>
  
  <p>But when I put this in the URL:</p>
  
  <pre><code>http://localhost:8080/mockup/index
  </code></pre>
  
  <p>I got the following log in the console</p>
  
  <pre><code>o.s.web.servlet.DispatcherServlet        : Servlet 'dispatcherServlet' configured successfully
  o.s.web.servlet.DispatcherServlet        : DispatcherServlet with name 'dispatcherServlet' processing GET request for [/mockup/index]
  s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /mockup/index
  s.w.s.m.m.a.RequestMappingHandlerMapping : Did not find handler method for [/mockup/index]
  o.s.w.s.handler.SimpleUrlHandlerMapping  : Matching patterns for request [/mockup/index] are [/**]
  o.s.w.s.handler.SimpleUrlHandlerMapping  : URI Template variables for request [/mockup/index] are {}
  o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapping [/mockup/index] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/], class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@8b91134]]] and 1 interceptor
  o.s.web.servlet.DispatcherServlet        : Last-Modified value for [/mockup/index] is: -1
  o.s.web.servlet.DispatcherServlet        : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
  o.s.web.servlet.DispatcherServlet        : Successfully completed request
  o.s.web.servlet.DispatcherServlet        : DispatcherServlet with name 'dispatcherServlet' processing GET request for [/error]
  s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /error
  </code></pre>