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

阅读 113

2022-04-13

在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)

0 0 举报