您好,欢迎来到华佗小知识。
搜索
您的当前位置:首页将项目打包运行时报错:jar中没有主清单属性

将项目打包运行时报错:jar中没有主清单属性

来源:华佗小知识

1、问题是因为pom出现问题,添加以下代码,重新打包。

<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <configuration>
        <!-- 指定程序入口 -->
        <mainClass>com.hongxin.welcome.WelcomeApplication</mainClass>
        <layers>
            <enabled>true</enabled>
        </layers>
    </configuration>
    <!--执行重新打包,将springboot依赖都打进jar包中-->
    <executions>
        <execution>
            <goals>
                <goal>repackage</goal>
            </goals>
        </execution>
    </executions>
</plugin>

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- huatuo0.cn 版权所有 湘ICP备2023017654号-2

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务