Springboot启动时报“run failed: Unable to find a single main class from the following candidates“

匿名 (未验证) 提交于 2019-12-03 00:22:01

一、现象描述

Spring boot启动时报错误如下:

Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.4.1.RELEASE:run (default-cli) on project SpringBootHotDeploy: Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:1.4.1.RELEASE:run failed: Unable to find a single main class from the following candidates [com.queen.controller.HotDeployAPP, com.queen.controller.APP] -> [Help 1]

从字面上理解就是无法从下列候选项中找到单个主类。这个问题笔者遇到时候比较懵逼,后来发现自己建了两个APP类,导致启动服务无法判断到底要启动哪一个APP类。


二、解决办法

解决方案很简单:删除一个你想要删除的APP就可以了


=======欢迎大家拍砖,小手一抖,多多点赞哟!=======

版权声明:本文为博主原创文章,允许转载,但转载必须标明出处。


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!