0
点赞
收藏
分享

微信扫一扫

成功解决 XXX--1.0-SNAPSHOT.jar中没有主清单属性

Sikj_6590 2022-04-13 阅读 201
java

如果您使用的是Springboot框架,那么只需要在pom.xml中添加如下配置,会自动检测主类。

<build>
	<plugins>
		<plugin>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-maven-plugin</artifactId>
			<executions>
				<execution>
					<goals>
						<goal>repackage</goal><!--可以把依赖的包都打包到生成的Jar包中 -->
					</goals>
				</execution>
			</executions>
		</plugin>
	</plugins>
</build>

再次运行成功
在这里插入图片描述

举报

相关推荐

0 条评论