一、先对项目进行
二、查看项目目录下是否存在target文件
三、查看是否存在jar文件
四、使用 cmd 运行 java -jar (把打包好的jar包拉过来即可运行)
注意事项:打包之前 在pom.xml中加入启动类的依赖
<–这是启动类路径–>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.example.demo.DemoApplication</mainClass>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>