**
执行jar包报错 no main manifest attribute, in /app.jar
**
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<includeSystemScope>true</includeSystemScope>
<mainClass>com.xxx.xxx.xxx</mainClass>
</configuration>
</plugin>
本文介绍了解决执行jar包时出现的“no main-class manifest attribute”错误的方法。通过配置Maven的spring-boot-maven-plugin插件,设置主类路径,并确保包含依赖。适用于Spring Boot项目的打包与运行。

3704

被折叠的 条评论
为什么被折叠?



