Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 661 Bytes

Deploy-SpringBootApp-In-Tomcat.md

File metadata and controls

26 lines (22 loc) · 661 Bytes

Deploying Spring Boot Application in Standalone Tomcat

To deploy applications developed in Spring boot in standalone tomcat, following changes needs to be done

In Main Class

public class SimpleRestApp extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
         return application.sources(SimpleRestApp.class);
    }

    public static void main(String[] args) {
         SpringApplication.run(SimpleRestApp.class, args);
    }
}

In pom.xml

<packaging>war</packaging>

<build>
  <finalName>SimpleRestApp</finalName>
    ....
</build>