英文:
Exception in thread "main" java.lang.IllegalArgumentException: No auto configuration classes found in META-INF/spring.factories
问题
我在从Eclipse导出可运行的JAR
时遇到了问题。
尝试过使用maven插件
,spring-boot插件
和简单的Java项目导出
。
然而,它显示了与spring.factories文件相关的错误。我已经在查阅了谷歌后,在所需文件夹中复制并粘贴了它。
我需要导出一个包括一些第三方JAR
和从pom.xml中下载的maven JAR以及属性文件的spring-boot应用
。
这个JAR应该可以在控制台上运行,或者可以在系统中使用批处理文件运行。
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
英文:
I am facing issue with exporting JAR
as runnable from Eclipse
.
Tried with maven plugin, spring-boot plugin & simple java project export
.
However, it shows spring.factories file related error. I have already copied and pasted it in the required folder after checking on google.
I need to export a spring-boot application
which includes some 3rd party JARs
and maven jars(to be downloaded from pom.xml) and properties file.
The Jar should be running from the console or using a batch file in the system.
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
答案1
得分: 0
在“终端”中运行以下命令:
mvn install
不运行测试:
mvn install -DskipTests
或者
mvn install -DskipTests=true
JAR 文件将在 /target
文件夹中可用。
英文:
Run the following command in Terminal
mvn install
With out test
mvn install -DskipTests
or
mvn install -DskipTests=true
the jar will be available in /target
folder
专注分享java语言的经验与见解,让所有开发者获益!
评论