打包运行报no main manifest attribute

文章目录

      • 场景
      • 解决

场景

打包运行报错:打包运行报no main manifest attribute, 包的大小也只有几十kb

解决

spring-boot-maven-plugin添加repackage配置,这会把引入jar

          <plugin>
                <groupId>org.springframework.bootgroupId>
                <artifactId>spring-boot-maven-pluginartifactId>
                <version>2.2.4.RELEASEversion>
                
                <executions>
                    <execution>
                        <goals>
                            <goal>repackagegoal> 
                        goals>
                    execution>
                executions>
            plugin>

你可能感兴趣的:(java,数据库,maven)