1. Skip the test when configuring packaging in the maven project pom
<properties>
<!-- maven打包时跳过测试 -->
<skipTests>true</skipTests>
</properties>
2. Execute the packaging command
mvn clean install
or
mvn clean package
After executing the command, a file such as 123.jar will be generated in the target directory of the project, and the springboot project package will be automatically marked as a jar package
3. Command to start the jar package
Find the root directory of 123.jar, execute java-jar 123.jar successfully started
Note: Springboot has built-in tomcat, so you only need to install jdk environment variables locally, and you can package it with the java -jar command