java-sproot项目打包 用命令行执行的方法


pom.xml

配置打包jar包需要的库



                org.springframework.boot
                spring-boot-maven-plugin
                2.3.7.RELEASE
               //
                //  com.example.b_end_test_project.BEndTestProjectApplication --    这个不配置也行 会自动找到启动类,配置的话打包前要注意是否正确
              // 
 

在maven点击 【package】打包

cd到 打包出来的jar包目录下

执行命令: java -jar B_End_Test_Project-0.0.1-SNAPSHOT.jar (打包出来的jar包) 就可以启动你的项目了