title: Controller not invoked by Tomcat when application is deployed as war
body: <p>I am working on a web application using SpringBoot.</p>
  
  <p>The problem I am facing is as follows. The application is running fine from Eclipse, but when I deploy the project as a <em>war</em> in tomcat 7, it's giving me "HTTP Status 404". No exception found in tomcat logs.</p>
  
  <p>Below is my controller:</p>
  
  <pre><code>@RestController 
  public class TinyUrlController{
  
      @Autowired TinyUrlService tinyUrlService;
  
      @RequestMapping("/create")
      public String createUrl(@RequestParam("url") String url,HttpServletRequest request){
  
          TinyUrl tinyUrl = tinyUrlService.createUrl(url);
  
          return tinyUrl.toString();
  
      }
  }
  </code></pre>