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>

 

posted on 2018-05-31 00:26  lvlv岁月流逝  阅读(8684)  评论(1编辑  收藏  举报

导航