title: Spring - No mapping found for HTTP request with URI
body: <p>I'm coding a Spring server and I am using Retrofit to make the api calls.</p>
  
  <p>I have the next interface for the Retrofit client:</p>
  
  <pre><code>import retrofit.http.Body;
  import retrofit.http.GET;
  import retrofit.http.POST;
  
  public interface AuthSvcApi {
  
      public static final String AUTHENTICATION_PATH = "/authToken";
  
      @POST(AUTHENTICATION_PATH)
      public boolean loginUser(@Body String accessToken);
  }
  </code></pre>
  
  <p>Then my controller is:</p>
  
  <pre><code>import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestBody;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  import org.springframework.web.bind.annotation.ResponseBody;
  
  import com.purposes.client.AuthSvcApi;
  
  @Controller
  public class AuthSvc{
  
      @RequestMapping(value=AuthSvcApi.AUTHENTICATION_PATH, method = RequestMethod.POST)
      public @ResponseBody boolean loginUser(@RequestBody String accessToken) {
          CheckAccessToken checkAccessToken = new CheckFacebookAccessToken();
          checkAccessToken.checkToken(accessToken);
          return false;
      }
  }
  </code></pre>
  
  <p>The method isn't finished, but it should work. And the application class is:</p>
  
  <pre><code>import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
  import org.springframework.context.annotation.ComponentScan;
  import org.springframework.context.annotation.Configuration;
  import org.springframework.web.servlet.config.annotation.EnableWebMvc;
  
  
  //Tell Spring to automatically inject any dependencies that are marked in
  //our classes with @Autowired
  @EnableAutoConfiguration
  //Tell Spring to turn on WebMVC (e.g., it should enable the DispatcherServlet
  //so that requests can be routed to our Controllers)
  @EnableWebMvc
  //Tell Spring to go and scan our controller package (and all sub packages) to
  //find any Controllers or other components that are part of our applciation.
  //Any class in this package that is annotated with @Controller is going to be
  //automatically discovered and connected to the DispatcherServlet.
  @ComponentScan
  //Tell Spring that this object represents a Configuration for the
  //application
  @Configuration
  public class Application {
  
      public static void main(String[] args) {
          SpringApplication.run(Application.class, args);
      }
  }
  </code></pre>
  
  <p>I don't know why this doesn't work fine, but I am going crazy because the response is:</p>
  
  <pre><code>No mapping found for HTTP request with URI [/authToken] in DispatcherServlet with name 'dispatcherServlet'
  </code></pre>