300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > Idea Spring Boot项目提示 repackage failed: Unable to find main class

Idea Spring Boot项目提示 repackage failed: Unable to find main class

时间:2019-04-10 07:12:04

相关推荐

Idea Spring Boot项目提示 repackage failed: Unable to find main class

本人项目是一个多模块的Spring Boot项目,模块打包时一直显示没有找到主类,很奇怪,我项目中其它的模块都可以正常打包

报错内容:

Failed to execute goal org.springframework.boot: spring-boot-maven-plugin:2.6.4: repackage (repackage) on project XXX: Execution repackage of goal org.springframework.boot: spring-boot-maven-plugin:2.6.4: repackage failed: Unable to find main class

解决方法:

在项目该模块中,新建立一个包含主函数的类,然后在 Maven 中重新 install 打包该模块就成功了。事后可以删除,目前没发现什么问题。

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