1、Unable to find a single main class from the following candidates 1.1、问题描述 maven build时出现以下错误提示日志: [ERROR] Failed to execute goal ...
在启动SpringBoot项目是报错 Unable to find a single main class from the following candidates boot.myboot.SampleController, boot.myboot.App 意思 是从这两个类中找不到要执行那个main方法 执行spring boot:run X打印出Debug日志 错误原因是因为:在这两个类中都 ...
2017-11-08 22:20 0 1167 推荐指数:
1、Unable to find a single main class from the following candidates 1.1、问题描述 maven build时出现以下错误提示日志: [ERROR] Failed to execute goal ...
关于start-class,spring boot官方手册是这么说明的: The plugin rewrites your manifest, and in particular it manages the Main-Class and Start-Class entries, so ...
问题如下: 解决方法: 这个错误是因为Maven在执行打包的时候会查找项目中的main方法,并设置为Spring Boot生成JAR包的启动入口,但此时有多个main方法,Maven插件就无法确认是用哪个。因此出现此异常。 1、注释掉其他无用的main方法即可解决此问题 ...
这种错误有许多可能的错误之处,我的是因为: 我的项目结构目录(有三级): |---父项目 |---子模块 ...
最近在开发中,遇到这样一个问题,一个通用的工具类项目,在进行打包时,出现repackage failed: Unable to find main class提示找不到主类问题,我就想,我这个项目是一个通用的工具类,不是一个SpringBoot Web工程,我又不需要Main方法的程序启动入口 ...
Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.1.6.RELEASE:repackage failed: Unable to find main class -> ...
搜了好久,有人提到需要spring-boot-maven-plugin这个插件。 添加以后,有的可以了,有的不行。 最后发现是插件必须配置<skip>true</skip>这个 ...
最近开发了一个短信报警的服务,打成程序包之后,再本地windows启动(start.bat)没有问题,但是发到生产环境,报如下错: Could not find the main class 莫名其妙的报错,网上查了一下,都无法解决,后来想到既然我本地是正常的,那很有可能是环境问题 ...