项目>右键>Run As>Maven build…

Eclipse导出SpringBoot Jar

然后在target文件夹下面就生成jar文件

运行:java -jar SpringBootDemo.jar

注意:
必须选择Skip Tests跳过单元测试,否则有可能出现打包失败
遇到:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile
检查Installed JREs的设置修改为jdk

相关文章:

  • 2021-11-28
  • 2021-11-28
  • 2021-04-23
  • 2021-12-25
  • 2021-03-26
  • 2021-12-04
  • 2021-07-18
猜你喜欢
  • 2021-06-16
  • 2021-11-23
  • 2021-11-28
  • 2021-12-09
相关资源
相似解决方案