首页 > 其他分享 >SpringBoot启动时报错 no main manifest attribute, in XXX1.0.0-SNAPSHOT.jar

SpringBoot启动时报错 no main manifest attribute, in XXX1.0.0-SNAPSHOT.jar

时间:2022-12-31 23:44:31浏览次数:41  
标签:SpringBoot no attribute jar SNAPSHOT main

SpringBoot启动时报错 no main manifest attribute, in XXX1.0.0-SNAPSHOT.jar


 

问题原因

在pom.xml 的 build中添加plugin

 

解决方案

在pom.xml文件中,添加如下内容:

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>2.6.5</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

 

标签:SpringBoot,no,attribute,jar,SNAPSHOT,main
From: https://www.cnblogs.com/miracle-luna/p/17017597.html

相关文章