First, modify the Pom.xml.
1. Packaging changed to War
2. Build node add <finalName> your project name </finalName>
Second, modify the project start class, inherit Springbootservletinitializer, rewrite the Configure method.
Three, packaging. The war file is generated under the project path target directory.
1. Idea, double-click the package in Maven view
2. Eclipse, right-click the project name | Run as | Maven Install
3. Command line, go to project path, run MVN package or mvn install
Iv. deploy to Tomcat.
Copy the resulting war package into Tomcat's WebApp directory, launch Tomcat, browser access localhost:[port number/[Project name-finalname node content in pom file]
Attached: To start Tomcat you need to build a Tomcat runtime environment: Install JDK, configure Tomcat environment variables
Springboot Fight the war package and deploy to Tomcat run