对于一个完成好的后端项目,如何进行打包发送给其他人,在电脑上进行查看
1.在pom.xml添加:
<build>
<plugins>
<!-- 打包插件-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>3.1.3</version>
</plugin>
</plugins>
</build>
2.点击maven
出现报错:Please refer to D:\Learn\big-news\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
解决方案:
skip test
打包成功:
3.打包成功后,在cmd里面运行:
输入:
java -jar big-news-1.0-SNAPSHOT.jar
现在就是运行起来了:
通过postman测试: