一、报错内容
Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.6.11:repackage (repackage) on project analyze: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.6.11:repackage failed: Unable to find a single main class from the following candidates [com.xxx.analyze.LuckyLogAnalyzeApplication, com.xxx.analyze.consumer.FlinkESTest]
二、报错说明
因为LuckyLogAnalyzeApplication 和 FlinkESTest两个类中都有main方法,Maven找到了多个,所以在执行mave install的时候,报了上面的错误。
三、报错解决
直接删掉其中一个类,问题解决!