一、现象描述
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类。