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 莫名其妙的報錯,網上查了一下,都無法解決,后來想到既然我本地是正常的,那很有可能是環境問題 ...