title: Project starting in embedded Tomcat, but doesn't work in full Tomcat
body: <p>I have small SpringBoot project with few RESTful-services which I made for studying Spring and REST technology. If I run it through spring-boot:run it working properly on localhost:8080/ + what I wrote in @RequestMapping in Controller. In example, on localhost:8080/restapp/test/{id} :</p>
  
  <pre><code>@RequestMapping(value = "http ://localhost:8080/restapps-0.0.1-SNAPSHOT/restapp/test/{id}",
        method = RequestMethod.GET)
      public String getWelcome(@PathVariable(value = "id") String id) {
      return "Welcome to jax-rs " + id;
  }
  </code></pre>
  
  <p>While deploying in full Tomcat, it started on localhost:8080/project_version it opened index.html (whitch I added for testing while created project) and i haven't access to my services. I trying:</p>
  
  <p>localhost:8080/project_version/restapp/test/{id}</p>
  
  <p>localhost:8080/project_version/test/{id}</p>
  
  <p>localhost:8080/project_version/project_name/restapp/test/{id}</p>
  
  <p>but have only 404 error.</p>
  
  <p>Application.java</p>
  
  <pre><code>@Configuration
  @EnableAutoConfiguration
  @ComponentScan
  public class Application {
      public static void main(String[] args) {
          ApplicationContext ctx = SpringApplication.run(Application.class, args);
      }
  }
  </code></pre>
  
  <p>Controller.java</p>
  
  <pre><code>@RestController
  public class Controller extends ApplicationConfig {
  
      @Override
      public Set&lt;Class&lt;?&gt;&gt; getClasses() {
          Set&lt;Class&lt;?&gt;&gt; s = new HashSet&lt;Class&lt;?&gt;&gt;();
          s.add(Controller.class);
          return s;
      }
  
      @RequestMapping(value = "http ://localhost:8080/restapps-0.0.1-SNAPSHOT/restapp/test/{id}",
              method = RequestMethod.GET)
      public String getWelcome(@PathVariable(value = "id") String id) {
          return "Welcome to jax-rs " + id;
      }
  }
  </code></pre>
  
  <p>ApplicationConfig - empty class, which extends Application.</p>
  
  <p>Thanx for all advises/answers.</p>