spring cloud分布式服务eureka启动时报错:java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.<init>([Ljava/lang/Object;)V
启动报错:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
"C:\Program Files\Java\jdk1.8.0_131\bin\java" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=54276 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:D:\apps\ideaIU-2017.3.4\lib\idea_rt.jar=54277:D:\apps\ideaIU-2017.3.4\bin -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_131\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\rt.jar;D:\apps\ideaProjects\springcloud\springcloud-ms-eureka\target\classes;D:\apps\apache-maven-3.5.0\repository\org\springframework\cloud\spring-cloud-starter-eureka-server\1.3.1.RELEASE\spring-cloud-starter-eureka-server-1.3.1.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\cloud\spring-cloud-netflix-eureka-server\1.3.1.RELEASE\spring-cloud-netflix-eureka-server-1.3.1.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\boot\spring-boot-starter-web\2.0.3.RELEASE\spring-boot-starter-web-2.0.3.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\boot\spring-boot-starter-json\2.0.3.RELEASE\spring-boot-starter-json-2.0.3.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.9.6\jackson-datatype-jdk8-2.9.6.jar;D:\apps\apache-maven-3.5.0\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.6\jackson-datatype-jsr310-2.9.6.jar;D:\apps\apache-maven-3.5.0\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.9.6\jackson-module-parameter-names-2.9.6.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\boot\spring-boot-starter-tomcat\2.0.3.RELEASE\spring-boot-starter-tomcat-2.0.3.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\apache\tomcat\embed\tomcat-embed-core\8.5.31\tomcat-embed-core-8.5.31.jar;D:\apps\apache-maven-3.5.0\repository\org\apache\tomcat\embed\tomcat-embed-el\8.5.31\tomcat-embed-el-8.5.31.jar;D:\apps\apache-maven-3.5.0\repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.31\tomcat-embed-websocket-8.5.31.jar;D:\apps\apache-maven-3.5.0\repository\org\hibernate\validator\hibernate-validator\6.0.10.Final\hibernate-validator-6.0.10.Final.jar;D:\apps\apache-maven-3.5.0\repository\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;D:\apps\apache-maven-3.5.0\repository\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;D:\apps\apache-maven-3.5.0\repository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\spring-web\5.0.7.RELEASE\spring-web-5.0.7.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\spring-webmvc\5.0.7.RELEASE\spring-webmvc-5.0.7.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\boot\spring-boot-starter-actuator\2.0.3.RELEASE\spring-boot-starter-actuator-2.0.3.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\boot\spring-boot-actuator-autoconfigure\2.0.3.RELEASE\spring-boot-actuator-autoconfigure-2.0.3.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\boot\spring-boot-actuator\2.0.3.RELEASE\spring-boot-actuator-2.0.3.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\io\micrometer\micrometer-core\1.0.5\micrometer-core-1.0.5.jar;D:\apps\apache-maven-3.5.0\repository\org\hdrhistogram\HdrHistogram\2.1.10\HdrHistogram-2.1.10.jar;D:\apps\apache-maven-3.5.0\repository\org\latencyutils\LatencyUtils\2.0.3\LatencyUtils-2.0.3.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\boot\spring-boot-starter-freemarker\2.0.3.RELEASE\spring-boot-starter-freemarker-2.0.3.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\freemarker\freemarker\2.3.28\freemarker-2.3.28.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\spring-context-support\5.0.7.RELEASE\spring-context-support-5.0.7.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\cloud\spring-cloud-netflix-core\1.3.1.RELEASE\spring-cloud-netflix-core-1.3.1.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\cloud\spring-cloud-netflix-eureka-client\1.3.1.RELEASE\spring-cloud-netflix-eureka-client-1.3.1.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\com\netflix\eureka\eureka-client\1.6.2\eureka-client-1.6.2.jar;D:\apps\apache-maven-3.5.0\repository\org\codehaus\jettison\jettison\1.3.7\jettison-1.3.7.jar;D:\apps\apache-maven-3.5.0\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;D:\apps\apache-maven-3.5.0\repository\com\netflix\netflix-commons\netflix-eventbus\0.3.0\netflix-eventbus-0.3.0.jar;D:\apps\apache-maven-3.5.0\repository\com\netflix\netflix-commons\netflix-infix\0.3.0\netflix-infix-0.3.0.jar;D:\apps\apache-maven-3.5.0\repository\commons-jxpath\commons-jxpath\1.3\commons-jxpath-1.3.jar;D:\apps\apache-maven-3.5.0\repository\joda-time\joda-time\2.9.9\joda-time-2.9.9.jar;D:\apps\apache-maven-3.5.0\repository\org\antlr\antlr-runtime\3.4\antlr-runtime-3.4.jar;D:\apps\apache-maven-3.5.0\repository\org\antlr\stringtemplate\3.2.1\stringtemplate-3.2.1.jar;D:\apps\apache-maven-3.5.0\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;D:\apps\apache-maven-3.5.0\repository\com\google\code\gson\gson\2.8.5\gson-2.8.5.jar;D:\apps\apache-maven-3.5.0\repository\org\apache\commons\commons-math\2.2\commons-math-2.2.jar;D:\apps\apache-maven-3.5.0\repository\javax\ws\rs\jsr311-api\1.1.1\jsr311-api-1.1.1.jar;D:\apps\apache-maven-3.5.0\repository\com\netflix\servo\servo-core\0.10.1\servo-core-0.10.1.jar;D:\apps\apache-maven-3.5.0\repository\com\netflix\servo\servo-internal\0.10.1\servo-internal-0.10.1.jar;D:\apps\apache-maven-3.5.0\repository\com\sun\jersey\jersey-core\1.19.1\jersey-core-1.19.1.jar;D:\apps\apache-maven-3.5.0\repository\com\sun\jersey\jersey-client\1.19.1\jersey-client-1.19.1.jar;D:\apps\apache-maven-3.5.0\repository\com\sun\jersey\contribs\jersey-apache-client4\1.19.1\jersey-apache-client4-1.19.1.jar;D:\apps\apache-maven-3.5.0\repository\org\apache\httpcomponents\httpclient\4.5.5\httpclient-4.5.5.jar;D:\apps\apache-maven-3.5.0\repository\org\apache\httpcomponents\httpcore\4.4.9\httpcore-4.4.9.jar;D:\apps\apache-maven-3.5.0\repository\commons-codec\commons-codec\1.11\commons-codec-1.11.jar;D:\apps\apache-maven-3.5.0\repository\com\google\inject\guice\4.1.0\guice-4.1.0.jar;D:\apps\apache-maven-3.5.0\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;D:\apps\apache-maven-3.5.0\repository\com\sun\jersey\jersey-servlet\1.19.1\jersey-servlet-1.19.1.jar;D:\apps\apache-maven-3.5.0\repository\com\sun\jersey\jersey-server\1.19.1\jersey-server-1.19.1.jar;D:\apps\apache-maven-3.5.0\repository\com\netflix\eureka\eureka-core\1.6.2\eureka-core-1.6.2.jar;D:\apps\apache-maven-3.5.0\repository\org\codehaus\woodstox\woodstox-core-asl\4.4.1\woodstox-core-asl-4.4.1.jar;D:\apps\apache-maven-3.5.0\repository\javax\xml\stream\stax-api\1.0-2\stax-api-1.0-2.jar;D:\apps\apache-maven-3.5.0\repository\com\netflix\archaius\archaius-core\0.7.4\archaius-core-0.7.4.jar;D:\apps\apache-maven-3.5.0\repository\com\google\code\findbugs\jsr305\3.0.1\jsr305-3.0.1.jar;D:\apps\apache-maven-3.5.0\repository\javax\inject\javax.inject\1\javax.inject-1.jar;D:\apps\apache-maven-3.5.0\repository\com\fasterxml\jackson\dataformat\jackson-dataformat-xml\2.9.6\jackson-dataformat-xml-2.9.6.jar;D:\apps\apache-maven-3.5.0\repository\com\fasterxml\jackson\module\jackson-module-jaxb-annotations\2.9.6\jackson-module-jaxb-annotations-2.9.6.jar;D:\apps\apache-maven-3.5.0\repository\org\codehaus\woodstox\stax2-api\3.1.4\stax2-api-3.1.4.jar;D:\apps\apache-maven-3.5.0\repository\com\fasterxml\woodstox\woodstox-core\5.0.3\woodstox-core-5.0.3.jar;D:\apps\apache-maven-3.5.0\repository\com\thoughtworks\xstream\xstream\1.4.9\xstream-1.4.9.jar;D:\apps\apache-maven-3.5.0\repository\xmlpull\xmlpull\1.1.3.1\xmlpull-1.1.3.1.jar;D:\apps\apache-maven-3.5.0\repository\xpp3\xpp3_min\1.1.4c\xpp3_min-1.1.4c.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\cloud\spring-cloud-starter-archaius\1.3.1.RELEASE\spring-cloud-starter-archaius-1.3.1.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\commons-configuration\commons-configuration\1.8\commons-configuration-1.8.jar;D:\apps\apache-maven-3.5.0\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;D:\apps\apache-maven-3.5.0\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;D:\apps\apache-maven-3.5.0\repository\com\fasterxml\jackson\core\jackson-core\2.9.6\jackson-core-2.9.6.jar;D:\apps\apache-maven-3.5.0\repository\com\fasterxml\jackson\core\jackson-databind\2.9.6\jackson-databind-2.9.6.jar;D:\apps\apache-maven-3.5.0\repository\com\google\guava\guava\18.0\guava-18.0.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\cloud\spring-cloud-starter-ribbon\1.3.1.RELEASE\spring-cloud-starter-ribbon-1.3.1.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\com\netflix\ribbon\ribbon\2.2.2\ribbon-2.2.2.jar;D:\apps\apache-maven-3.5.0\repository\com\netflix\ribbon\ribbon-transport\2.2.2\ribbon-transport-2.2.2.jar;D:\apps\apache-maven-3.5.0\repository\io\reactivex\rxnetty-contexts\0.4.9\rxnetty-contexts-0.4.9.jar;D:\apps\apache-maven-3.5.0\repository\io\reactivex\rxnetty-servo\0.4.9\rxnetty-servo-0.4.9.jar;D:\apps\apache-maven-3.5.0\repository\com\netflix\hystrix\hystrix-core\1.5.12\hystrix-core-1.5.12.jar;D:\apps\apache-maven-3.5.0\repository\io\reactivex\rxnetty\0.4.9\rxnetty-0.4.9.jar;D:\apps\apache-maven-3.5.0\repository\io\netty\netty-codec-http\4.1.25.Final\netty-codec-http-4.1.25.Final.jar;D:\apps\apache-maven-3.5.0\repository\io\netty\netty-codec\4.1.25.Final\netty-codec-4.1.25.Final.jar;D:\apps\apache-maven-3.5.0\repository\io\netty\netty-transport-native-epoll\4.1.25.Final\netty-transport-native-epoll-4.1.25.Final.jar;D:\apps\apache-maven-3.5.0\repository\io\netty\netty-common\4.1.25.Final\netty-common-4.1.25.Final.jar;D:\apps\apache-maven-3.5.0\repository\io\netty\netty-buffer\4.1.25.Final\netty-buffer-4.1.25.Final.jar;D:\apps\apache-maven-3.5.0\repository\io\netty\netty-transport-native-unix-common\4.1.25.Final\netty-transport-native-unix-common-4.1.25.Final.jar;D:\apps\apache-maven-3.5.0\repository\io\netty\netty-transport\4.1.25.Final\netty-transport-4.1.25.Final.jar;D:\apps\apache-maven-3.5.0\repository\io\netty\netty-resolver\4.1.25.Final\netty-resolver-4.1.25.Final.jar;D:\apps\apache-maven-3.5.0\repository\com\netflix\ribbon\ribbon-core\2.2.2\ribbon-core-2.2.2.jar;D:\apps\apache-maven-3.5.0\repository\com\netflix\ribbon\ribbon-httpclient\2.2.2\ribbon-httpclient-2.2.2.jar;D:\apps\apache-maven-3.5.0\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;D:\apps\apache-maven-3.5.0\repository\com\netflix\netflix-commons\netflix-commons-util\0.1.1\netflix-commons-util-0.1.1.jar;D:\apps\apache-maven-3.5.0\repository\com\netflix\ribbon\ribbon-loadbalancer\2.2.2\ribbon-loadbalancer-2.2.2.jar;D:\apps\apache-maven-3.5.0\repository\com\netflix\netflix-commons\netflix-statistics\0.1.1\netflix-statistics-0.1.1.jar;D:\apps\apache-maven-3.5.0\repository\io\reactivex\rxjava\1.3.8\rxjava-1.3.8.jar;D:\apps\apache-maven-3.5.0\repository\com\netflix\ribbon\ribbon-eureka\2.2.2\ribbon-eureka-2.2.2.jar;D:\apps\apache-maven-3.5.0\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\boot\spring-boot-starter\2.0.3.RELEASE\spring-boot-starter-2.0.3.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\boot\spring-boot\2.0.3.RELEASE\spring-boot-2.0.3.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\spring-context\5.0.7.RELEASE\spring-context-5.0.7.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\spring-aop\5.0.7.RELEASE\spring-aop-5.0.7.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\spring-beans\5.0.7.RELEASE\spring-beans-5.0.7.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\spring-expression\5.0.7.RELEASE\spring-expression-5.0.7.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\boot\spring-boot-autoconfigure\2.0.3.RELEASE\spring-boot-autoconfigure-2.0.3.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\boot\spring-boot-starter-logging\2.0.3.RELEASE\spring-boot-starter-logging-2.0.3.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\apps\apache-maven-3.5.0\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\apps\apache-maven-3.5.0\repository\org\apache\logging\log4j\log4j-to-slf4j\2.10.0\log4j-to-slf4j-2.10.0.jar;D:\apps\apache-maven-3.5.0\repository\org\apache\logging\log4j\log4j-api\2.10.0\log4j-api-2.10.0.jar;D:\apps\apache-maven-3.5.0\repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;D:\apps\apache-maven-3.5.0\repository\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\spring-core\5.0.7.RELEASE\spring-core-5.0.7.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\spring-jcl\5.0.7.RELEASE\spring-jcl-5.0.7.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\yaml\snakeyaml\1.19\snakeyaml-1.19.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\cloud\spring-cloud-starter\2.0.0.RELEASE\spring-cloud-starter-2.0.0.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\cloud\spring-cloud-context\1.2.2.RELEASE\spring-cloud-context-1.2.2.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\security\spring-security-crypto\5.0.6.RELEASE\spring-security-crypto-5.0.6.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\cloud\spring-cloud-commons\1.2.2.RELEASE\spring-cloud-commons-1.2.2.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\springframework\security\spring-security-rsa\1.0.3.RELEASE\spring-security-rsa-1.0.3.RELEASE.jar;D:\apps\apache-maven-3.5.0\repository\org\bouncycastle\bcpkix-jdk15on\1.55\bcpkix-jdk15on-1.55.jar;D:\apps\apache-maven-3.5.0\repository\org\bouncycastle\bcprov-jdk15on\1.55\bcprov-jdk15on-1.55.jar" com.swapping.springcloud.ms.eureka.SpringcloudMsEurekaApplication 19:19:05.491 [main] DEBUG org.springframework.boot.context.logging.ClasspathLoggingApplicationListener - Application failed to start with classpath: [file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/charsets.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/deploy.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/access-bridge-64.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/cldrdata.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/dnsns.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/jaccess.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/localedata.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/nashorn.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/sunec.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/sunjce_provider.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/sunmscapi.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/sunpkcs11.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/zipfs.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/javaws.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/jce.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/jfr.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/jfxswt.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/jsse.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/management-agent.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/plugin.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/resources.jar, file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/rt.jar, file:/D:/apps/ideaProjects/springcloud/springcloud-ms-eureka/target/classes/, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/cloud/spring-cloud-starter-eureka-server/1.3.1.RELEASE/spring-cloud-starter-eureka-server-1.3.1.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/cloud/spring-cloud-netflix-eureka-server/1.3.1.RELEASE/spring-cloud-netflix-eureka-server-1.3.1.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/boot/spring-boot-starter-web/2.0.3.RELEASE/spring-boot-starter-web-2.0.3.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/boot/spring-boot-starter-json/2.0.3.RELEASE/spring-boot-starter-json-2.0.3.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.9.6/jackson-datatype-jdk8-2.9.6.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.9.6/jackson-datatype-jsr310-2.9.6.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.9.6/jackson-module-parameter-names-2.9.6.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/boot/spring-boot-starter-tomcat/2.0.3.RELEASE/spring-boot-starter-tomcat-2.0.3.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.31/tomcat-embed-core-8.5.31.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/apache/tomcat/embed/tomcat-embed-el/8.5.31/tomcat-embed-el-8.5.31.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/apache/tomcat/embed/tomcat-embed-websocket/8.5.31/tomcat-embed-websocket-8.5.31.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/hibernate/validator/hibernate-validator/6.0.10.Final/hibernate-validator-6.0.10.Final.jar, file:/D:/apps/apache-maven-3.5.0/repository/javax/validation/validation-api/2.0.1.Final/validation-api-2.0.1.Final.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/jboss/logging/jboss-logging/3.3.2.Final/jboss-logging-3.3.2.Final.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/fasterxml/classmate/1.3.4/classmate-1.3.4.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/spring-web/5.0.7.RELEASE/spring-web-5.0.7.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/spring-webmvc/5.0.7.RELEASE/spring-webmvc-5.0.7.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/boot/spring-boot-starter-actuator/2.0.3.RELEASE/spring-boot-starter-actuator-2.0.3.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/boot/spring-boot-actuator-autoconfigure/2.0.3.RELEASE/spring-boot-actuator-autoconfigure-2.0.3.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/boot/spring-boot-actuator/2.0.3.RELEASE/spring-boot-actuator-2.0.3.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/io/micrometer/micrometer-core/1.0.5/micrometer-core-1.0.5.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/hdrhistogram/HdrHistogram/2.1.10/HdrHistogram-2.1.10.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/latencyutils/LatencyUtils/2.0.3/LatencyUtils-2.0.3.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/boot/spring-boot-starter-freemarker/2.0.3.RELEASE/spring-boot-starter-freemarker-2.0.3.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/freemarker/freemarker/2.3.28/freemarker-2.3.28.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/spring-context-support/5.0.7.RELEASE/spring-context-support-5.0.7.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/cloud/spring-cloud-netflix-core/1.3.1.RELEASE/spring-cloud-netflix-core-1.3.1.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/cloud/spring-cloud-netflix-eureka-client/1.3.1.RELEASE/spring-cloud-netflix-eureka-client-1.3.1.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/netflix/eureka/eureka-client/1.6.2/eureka-client-1.6.2.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/codehaus/jettison/jettison/1.3.7/jettison-1.3.7.jar, file:/D:/apps/apache-maven-3.5.0/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/netflix/netflix-commons/netflix-eventbus/0.3.0/netflix-eventbus-0.3.0.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/netflix/netflix-commons/netflix-infix/0.3.0/netflix-infix-0.3.0.jar, file:/D:/apps/apache-maven-3.5.0/repository/commons-jxpath/commons-jxpath/1.3/commons-jxpath-1.3.jar, file:/D:/apps/apache-maven-3.5.0/repository/joda-time/joda-time/2.9.9/joda-time-2.9.9.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/antlr/antlr-runtime/3.4/antlr-runtime-3.4.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/antlr/stringtemplate/3.2.1/stringtemplate-3.2.1.jar, file:/D:/apps/apache-maven-3.5.0/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/apache/commons/commons-math/2.2/commons-math-2.2.jar, file:/D:/apps/apache-maven-3.5.0/repository/javax/ws/rs/jsr311-api/1.1.1/jsr311-api-1.1.1.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/netflix/servo/servo-core/0.10.1/servo-core-0.10.1.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/netflix/servo/servo-internal/0.10.1/servo-internal-0.10.1.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/sun/jersey/jersey-core/1.19.1/jersey-core-1.19.1.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/sun/jersey/jersey-client/1.19.1/jersey-client-1.19.1.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/sun/jersey/contribs/jersey-apache-client4/1.19.1/jersey-apache-client4-1.19.1.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/apache/httpcomponents/httpclient/4.5.5/httpclient-4.5.5.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/apache/httpcomponents/httpcore/4.4.9/httpcore-4.4.9.jar, file:/D:/apps/apache-maven-3.5.0/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/google/inject/guice/4.1.0/guice-4.1.0.jar, file:/D:/apps/apache-maven-3.5.0/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/sun/jersey/jersey-servlet/1.19.1/jersey-servlet-1.19.1.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/sun/jersey/jersey-server/1.19.1/jersey-server-1.19.1.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/netflix/eureka/eureka-core/1.6.2/eureka-core-1.6.2.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/codehaus/woodstox/woodstox-core-asl/4.4.1/woodstox-core-asl-4.4.1.jar, file:/D:/apps/apache-maven-3.5.0/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/netflix/archaius/archaius-core/0.7.4/archaius-core-0.7.4.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/google/code/findbugs/jsr305/3.0.1/jsr305-3.0.1.jar, file:/D:/apps/apache-maven-3.5.0/repository/javax/inject/javax.inject/1/javax.inject-1.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.9.6/jackson-dataformat-xml-2.9.6.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.9.6/jackson-module-jaxb-annotations-2.9.6.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/codehaus/woodstox/stax2-api/3.1.4/stax2-api-3.1.4.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/fasterxml/woodstox/woodstox-core/5.0.3/woodstox-core-5.0.3.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/thoughtworks/xstream/xstream/1.4.9/xstream-1.4.9.jar, file:/D:/apps/apache-maven-3.5.0/repository/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar, file:/D:/apps/apache-maven-3.5.0/repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/cloud/spring-cloud-starter-archaius/1.3.1.RELEASE/spring-cloud-starter-archaius-1.3.1.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/commons-configuration/commons-configuration/1.8/commons-configuration-1.8.jar, file:/D:/apps/apache-maven-3.5.0/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/fasterxml/jackson/core/jackson-core/2.9.6/jackson-core-2.9.6.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/fasterxml/jackson/core/jackson-databind/2.9.6/jackson-databind-2.9.6.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/google/guava/guava/18.0/guava-18.0.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/cloud/spring-cloud-starter-ribbon/1.3.1.RELEASE/spring-cloud-starter-ribbon-1.3.1.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/netflix/ribbon/ribbon/2.2.2/ribbon-2.2.2.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/netflix/ribbon/ribbon-transport/2.2.2/ribbon-transport-2.2.2.jar, file:/D:/apps/apache-maven-3.5.0/repository/io/reactivex/rxnetty-contexts/0.4.9/rxnetty-contexts-0.4.9.jar, file:/D:/apps/apache-maven-3.5.0/repository/io/reactivex/rxnetty-servo/0.4.9/rxnetty-servo-0.4.9.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/netflix/hystrix/hystrix-core/1.5.12/hystrix-core-1.5.12.jar, file:/D:/apps/apache-maven-3.5.0/repository/io/reactivex/rxnetty/0.4.9/rxnetty-0.4.9.jar, file:/D:/apps/apache-maven-3.5.0/repository/io/netty/netty-codec-http/4.1.25.Final/netty-codec-http-4.1.25.Final.jar, file:/D:/apps/apache-maven-3.5.0/repository/io/netty/netty-codec/4.1.25.Final/netty-codec-4.1.25.Final.jar, file:/D:/apps/apache-maven-3.5.0/repository/io/netty/netty-transport-native-epoll/4.1.25.Final/netty-transport-native-epoll-4.1.25.Final.jar, file:/D:/apps/apache-maven-3.5.0/repository/io/netty/netty-common/4.1.25.Final/netty-common-4.1.25.Final.jar, file:/D:/apps/apache-maven-3.5.0/repository/io/netty/netty-buffer/4.1.25.Final/netty-buffer-4.1.25.Final.jar, file:/D:/apps/apache-maven-3.5.0/repository/io/netty/netty-transport-native-unix-common/4.1.25.Final/netty-transport-native-unix-common-4.1.25.Final.jar, file:/D:/apps/apache-maven-3.5.0/repository/io/netty/netty-transport/4.1.25.Final/netty-transport-4.1.25.Final.jar, file:/D:/apps/apache-maven-3.5.0/repository/io/netty/netty-resolver/4.1.25.Final/netty-resolver-4.1.25.Final.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/netflix/ribbon/ribbon-core/2.2.2/ribbon-core-2.2.2.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/netflix/ribbon/ribbon-httpclient/2.2.2/ribbon-httpclient-2.2.2.jar, file:/D:/apps/apache-maven-3.5.0/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/netflix/netflix-commons/netflix-commons-util/0.1.1/netflix-commons-util-0.1.1.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/netflix/ribbon/ribbon-loadbalancer/2.2.2/ribbon-loadbalancer-2.2.2.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/netflix/netflix-commons/netflix-statistics/0.1.1/netflix-statistics-0.1.1.jar, file:/D:/apps/apache-maven-3.5.0/repository/io/reactivex/rxjava/1.3.8/rxjava-1.3.8.jar, file:/D:/apps/apache-maven-3.5.0/repository/com/netflix/ribbon/ribbon-eureka/2.2.2/ribbon-eureka-2.2.2.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/boot/spring-boot-starter/2.0.3.RELEASE/spring-boot-starter-2.0.3.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/boot/spring-boot/2.0.3.RELEASE/spring-boot-2.0.3.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/spring-context/5.0.7.RELEASE/spring-context-5.0.7.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/spring-aop/5.0.7.RELEASE/spring-aop-5.0.7.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/spring-beans/5.0.7.RELEASE/spring-beans-5.0.7.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/spring-expression/5.0.7.RELEASE/spring-expression-5.0.7.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/boot/spring-boot-autoconfigure/2.0.3.RELEASE/spring-boot-autoconfigure-2.0.3.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/boot/spring-boot-starter-logging/2.0.3.RELEASE/spring-boot-starter-logging-2.0.3.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar, file:/D:/apps/apache-maven-3.5.0/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/apache/logging/log4j/log4j-to-slf4j/2.10.0/log4j-to-slf4j-2.10.0.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/apache/logging/log4j/log4j-api/2.10.0/log4j-api-2.10.0.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar, file:/D:/apps/apache-maven-3.5.0/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/spring-core/5.0.7.RELEASE/spring-core-5.0.7.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/spring-jcl/5.0.7.RELEASE/spring-jcl-5.0.7.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/yaml/snakeyaml/1.19/snakeyaml-1.19.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/cloud/spring-cloud-starter/2.0.0.RELEASE/spring-cloud-starter-2.0.0.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/cloud/spring-cloud-context/1.2.2.RELEASE/spring-cloud-context-1.2.2.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/security/spring-security-crypto/5.0.6.RELEASE/spring-security-crypto-5.0.6.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/cloud/spring-cloud-commons/1.2.2.RELEASE/spring-cloud-commons-1.2.2.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/springframework/security/spring-security-rsa/1.0.3.RELEASE/spring-security-rsa-1.0.3.RELEASE.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/bouncycastle/bcpkix-jdk15on/1.55/bcpkix-jdk15on-1.55.jar, file:/D:/apps/apache-maven-3.5.0/repository/org/bouncycastle/bcprov-jdk15on/1.55/bcprov-jdk15on-1.55.jar, file:/D:/apps/ideaIU-2017.3.4/lib/idea_rt.jar] 19:19:05.687 [background-preinit] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Log4j2LoggerProvider 19:19:05.688 [background-preinit] INFO org.hibernate.validator.internal.util.Version - HV000001: Hibernate Validator 6.0.10.Final 19:19:05.699 [background-preinit] DEBUG org.hibernate.validator.internal.engine.resolver.TraversableResolvers - Cannot find javax.persistence.Persistence on classpath. Assuming non JPA 2 environment. All properties will per default be traversable. 19:19:05.706 [background-preinit] DEBUG org.hibernate.validator.internal.xml.ValidationXmlParser - Trying to load META-INF/validation.xml for XML based Validator configuration. 19:19:05.709 [background-preinit] DEBUG org.hibernate.validator.internal.xml.ResourceLoaderHelper - Trying to load META-INF/validation.xml via TCCL 19:19:05.742 [background-preinit] DEBUG org.hibernate.validator.internal.xml.ResourceLoaderHelper - Trying to load META-INF/validation.xml via Hibernate Validator's class loader 19:19:05.744 [background-preinit] DEBUG org.hibernate.validator.internal.xml.ValidationXmlParser - No META-INF/validation.xml found. Using annotation based configuration only. 19:19:06.115 [background-preinit] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded expression factory via original TCCL 19:19:06.123 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as ValidatorFactory-scoped message interpolator. 19:19:06.123 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.engine.resolver.TraverseAllTraversableResolver as ValidatorFactory-scoped traversable resolver. 19:19:06.123 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider. 19:19:06.123 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider. 19:19:06.123 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory. 19:19:06.599 [main] ERROR org.springframework.boot.SpringApplication - Application run failed java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.<init>([Ljava/lang/Object;)V at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:157) at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:98) at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:64) at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:74) at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54) at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:358) at org.springframework.boot.SpringApplication.run(SpringApplication.java:317) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) at com.swapping.springcloud.ms.eureka.SpringcloudMsEurekaApplication.main(SpringcloudMsEurekaApplication.java:13) Process finished with exit code 1
报错原因:
因为父级项目的pom.xml文件中 spring cloud版本问题导致的原因 这里spring boot采用2.0.3版本
解决方法:
父级pom.xml文件【注意 各个jar的版本问题】
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.swapping</groupId> <artifactId>springcloud</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>springcloud</name> <description>Demo project for Spring Cloud</description> <modules> <module>springcloud-ms-eureka</module> </modules> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.3.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>1.8</java.version> <spring-cloud.version>2.0.0.RELEASE</spring-cloud.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <!--最外层 主项目 添加spring cloud依赖 https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter</artifactId> <version>${spring-cloud.version}</version> </dependency> </dependencies> <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>Finchley.RELEASE</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project>
eureka的这个子级pom.xml文件【注意2.0版本后eureka引用的jar名字的更改】
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.swapping</groupId> <artifactId>springcloud-ms-eureka</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>springcloud-ms-eureka</name> <description>eureka for project </description> <parent> <groupId>com.swapping</groupId> <artifactId>springcloud</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId> </dependency> </dependencies> </project>