300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > SpringBoot Maven repackage failed: Unable to find a single main class from the following candidates

SpringBoot Maven repackage failed: Unable to find a single main class from the following candidates

时间:2021-11-01 16:28:39

相关推荐

SpringBoot Maven repackage failed: Unable to find a single main class from the following candidates

现象

springboot 打包时遇到多个 main 无法正常打包

解决方法

指定主类

<!-- 打包插件 --><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><mainClass>com.ai.srd.modules.flowable.AiFlowFlowableApplication</mainClass></configuration></plugin>

推荐

之所有有多个主类,可能是有些临时单元测试代码,推荐把这部分代码写到 test 包里

参考资料

/qq_35606010/article/details/106187371

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