title: Tomcat gives 404 error when war file deployed for spring boot multimodule project. it works fine when start in IDE using same tomcat
body: <p>Tomcat gives 404 error when war file deployed for spring boot multimodule project.
  it works fine when start in IDE using same tomcat.</p>
  
  <p>code in parent pom </p>
  
  <pre><code>&lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;2.0.2.RELEASE&lt;/version&gt;
          &lt;relativePath /&gt;
      &lt;/parent&gt;
      &lt;dependencies&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-tomcat&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  </code></pre>
  
  <p>code in main file</p>
  
  <pre><code>@SpringBootApplication
  @RestController
  public class ABC extends SpringBootServletInitializer {
      @Override
      protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
          return application.sources(ABC.class);
      }
  
      public static void main(String[] args) {
          SpringApplication.run(ABC.class, args);
      }
  
      @RequestMapping(value = "/")
      public String hello() {
          return "Hello World from Tomcat";
      }
  }
  </code></pre>