700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > maven打包后运行:Error: Could not find or load main class ‐jar

maven打包后运行:Error: Could not find or load main class ‐jar

时间:2020-11-19 17:40:34

相关推荐

maven打包后运行:Error: Could not find or load main class ‐jar

在pom.xml文件中添加如下:

<build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><mainClass>com.yincunyu.test.HelloTest</mainClass></configuration><executions><execution><goals><goal>repackage</goal></goals></execution></executions></plugin></plugins></build>

注意:

此处要改为自己主类的位置

<mainClass>com.yincunyu.test.HelloTest</mainClass>

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。