title: Why is the main method not called when run spring boot project with external tomcat
body: <p>I made deployable war following this article.</p>
  <p><a href="https://docs.spring.io/spring-boot/docs/current/reference/html/howto-traditional-deployment.html" rel="nofollow noreferrer">https://docs.spring.io/spring-boot/docs/current/reference/html/howto-traditional-deployment.html</a></p>
  <p>then, run with external tomcat.</p>
  <p>why is the main method not called when run with external tomcat? (but process works well)</p>
  <pre><code>@SpringBootApplication
  public class Application extends SpringBootServletInitializer {
  
      @Override
      protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
          return application.sources(Application.class);
      }
  
      public static void main(String[] args) throws Exception {
          SpringApplication.run(Application.class, args);
      }
  
  }
  </code></pre>
  <p>I run with java -jar xxx.war, this main method has been called well.</p>
  <p>is there anything I missing?</p>