Unable to find a single main class from the following candidates

Unable to find a single main class from the following candidates(无法从以下候选中找到单个主类)

场景

当我用maven打包我的springboot项目时,出现错误

Unable to find a single main class from the following candidates_第1张图片

解决

报错说的无法找到单个主类,那就是你的启动类有多个,你注释掉一个启动类,然后重新打包就ok了

你可能感兴趣的:(java,maven,开发语言)