Springboot项目打成jar包(Maven+idea+Springboot)
环境:Maven+idea+Springboot
1.pom.xml
<groupId>com.ls</groupId>
<artifactId>demo-test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>demo-test</name>
<packaging>jar</packaging>
<description>Demo project for Spring Boot</description>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
3.输入:maven clean 然后在maven install,
4.找到jar
5运行:java -jar