exception is java.lang.IllegalArgumentException: No auto configuration classes found in META-INF/spring.factories. If you are using a custom packaging, make su re that file is correct.

spring cloud 项目使用maven 打包报错“No auto configuration classes found in META-INF/spring.factories”

在pom.xml中加入以下配置

  <plugin>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <configuration>
                            <fork>true</fork>
                            <mainClass>com.lv.DiscoveryApplicaion</mainClass>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>repackage</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

猜你喜欢

转载自www.cnblogs.com/lvlv/p/9114494.html