0
点赞
收藏
分享

微信扫一扫

解决在linux环境下启动jar时提示no main manifest attribute, in /xxxxx.jar异常

素锦时年_1b00 2022-04-13 阅读 113

在pom文件中添加以下内容 重新打包即可

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <includeSystemScope>true</includeSystemScope>
                    <mainClass>${groupId}.${artifactId}.MallApplication</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </build>
举报

相关推荐

0 条评论