對于一個完成好的后端項目,如何進行打包發送給其他人,在電腦上進行查看
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測試: