springboot项目 java -jar xxx.jar 没有主清单属性解决方法

1.在pom文件中添加如下

在这里插入图片描述

    <plugins>
        <!--解决SpringBoot打包成jar后运行提示没有主清单属性-->
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
				<fork>true</fork>
			</configuration>
        </plugin>
    </plugins>

猜你喜欢

转载自blog.csdn.net/qq_37493556/article/details/90108114