1. 程式人生 > >Spring Boot No auto configuration classes found in META-INF/spring.factories

Spring Boot No auto configuration classes found in META-INF/spring.factories

No auto configuration classes found in META-INF/spring.factories. If you are using a custom packaging, make sure that file is correct.         at org.springframework.util.Assert.notEmpty(Assert.java:276)
小狼第一次接觸springboot ,為了方便用的fatjar打包,結果出現這個問題,調整思路後在專案的pom.xml 修改如下程式碼之後用mvn package 然後執行命令 java -jar /opt/soft/elasticsearch_mongodb_test-0.0.1-SNAPSHOT.jar <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.4.2.RELEASE</version> <relativePath /> </parent> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <start-class>com.base.Application</start-class> </properties> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>1.5.1.RELEASE</version> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin> </plugins> </build>