最近在開發中,遇到這樣一個問題,一個通用的工具類項目,在進行打包時,出現repackage failed: Unable to find main class提示找不到主類問題,我就想,我這個項目是一個通用的工具類,不是一個SpringBoot Web工程,我又不需要Main方法的程序啟動入口 ...
解決方案: setting.xml文件添加如下配置: 參考鏈接:https: www.cnblogs.com thinking better p .html ...
2019-03-07 23:29 0 3455 推薦指數:
最近在開發中,遇到這樣一個問題,一個通用的工具類項目,在進行打包時,出現repackage failed: Unable to find main class提示找不到主類問題,我就想,我這個項目是一個通用的工具類,不是一個SpringBoot Web工程,我又不需要Main方法的程序啟動入口 ...
org.springframework.boot:spring-boot-maven-plugin:2.1.7.RELEASE:repa ...
【背景】spring-boot項目,打包成可執行jar,項目內有兩個帶有main方法的類並且都使用了@SpringBootApplication注解(或者另一種情形:你有兩個main方法並且所在類都沒有使用@SpringBootApplication注解),pom.xml ...
【背景】spring-boot項目,打包成可執行jar,項目內有兩個帶有main方法的類並且都使用了@SpringBootApplication注解(或者另一種情形:你有兩個main方法並且所在類都沒有使用@SpringBootApplication注解),pom.xml ...
【背景】spring-boot項目,打包成可執行jar,項目內有兩個帶有main方法的類並且都使用了@SpringBootApplication注解(或者另一種情形:你有兩個main方法並且所在類都沒有使用@SpringBootApplication注解),pom.xml ...
問題如下: 解決方法: 這個錯誤是因為Maven在執行打包的時候會查找項目中的main方法,並設置為Spring Boot生成JAR包的啟動入口,但此時有多個main方法,Maven插件就無法確認是用哪個。因此出現此異常。 1、注釋掉其他無用的main方法即可解決此問題 ...
install打包報錯: Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.3.7.RELEASE:repackage (repackage) on project zbbzfw-common ...