Introduction
When we develop Spring Boot application using Maven, the project is by default configured to package the project as JAR with an embedded Tomcat or another container.
When we develop Spring Boot application using Maven, the project is by default configured to package the project as JAR with an embedded Tomcat or another container.
If we wish to export the project as WAR for deployment on the external container, we will have to change the configuration.
Below are the steps to export Spring Boot project as WAR
STEP 1
Change the maven.xml, replace the packaging value as provided below
Change the maven.xml, replace the packaging value as provided below
<packaging>war</packaging>
STEP 2
Extend your main application class file from SpringBootServletInitializer and override its configure method as shown below
Please leave your feedback in the comments box.
This comment has been removed by a blog administrator.
ReplyDelete