报错信息:
[main] DEBUG org.springframework.boot.logging.ClasspathLoggingApplicationListener -
Application failed to start with classpath: [file:/F:/Java/jdk1.8.0_92/jre/lib/charsets.jar,
file:/F:/Java/jdk1.8.0_92/jre/lib/deploy.jar, file:/F:/Java/jdk1.8.0_92/jre/lib/ext/access-
bridge-64.jar, file:/F:/Java/jdk1.8.0_92/jre/lib/ext/cldrdata.jar,
file:/F:/Java/jdk1.8.0_92/jre/lib/ext/dnsns.jar,
file:/F:/Java/jdk1.8.0_92/jre/lib/ext/jaccess.jar,
file:/F:/Java/jdk1.8.0_92/jre/lib/ext/jfxrt.jar,
file:/F:/Java/jdk1.8.0_92/jre/lib/ext/localedata.jar,
file:/F:/Java/jdk1.8.0_92/jre/lib/ext/nashorn.jar,
file:/F:/Java/jdk1.8.0_92/jre/lib/ext/sunec.jar,
file:/F:/Java/jdk1.8.0_92/jre/lib/ext/sunjce_provider.jar,
file:/F:/Java/jdk1.8.0_92/jre/lib/ext/sunmscapi.jar,
file:/F:/Java/jdk1.8.0_92/jre/lib/ext/sunpkcs11.jar,
file:/F:/Java/jdk1.8.0_92/jre/lib/ext/zipfs.jar,
file:/F:/Java/jdk1.8.0_92/jre/lib/javaws.jar, file:/F:/Java/jdk1.8.0_92/jre/lib/jce.jar,
file:/F:/Java/jdk1.8.0_92/jre/lib/jfr.jar, file:/F:/Java/jdk1.8.0_92/jre/lib/jfxswt.jar,
file:/F:/Java/jdk1.8.0_92/jre/lib/jsse.jar, file:/F:/Java/jdk1.8.0_92/jre/lib/management-
agent.jar, file:/F:/Java/jdk1.8.0_92/jre/lib/plugin.jar,
file:/F:/Java/jdk1.8.0_92/jre/lib/resources.jar, file:/F:/Java/jdk1.8.0_92/jre/lib/rt.jar,
报错原因:springcloud和springboot 版本不配套
解决方法:修改pom文件中springboot和springcloud的version信息
<!-- 将当前项目声明为springboot项目 -->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.13.RELEASE</version>
</parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<!-- <version>Dalston.SR4</version>-->
<!-- <version>Finchley.M9</version>-->
<version>Greenwich.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
经测试:1.5.13.RELEASE版本的springboot和Greenwich.RELEASE的springcloud可配套使用。
springboot和springcloud版本对应关系:
Spring Cloud | Spring Boot |
---|---|
Angel版本 | 兼容Spring Boot 1.2.x |
Brixton版本 | 兼容Spring Boot 1.3.x,也兼容Spring Boot 1.4.x |
Camden版本 | 兼容Spring Boot 1.4.x,也兼容Spring Boot 1.5.x |
Dalston版本 | 兼容Spring Boot 1.5.x,不兼容Spring Boot 2.0.x |
Edgware版本 | 兼容Spring Boot 1.5.x,不兼容Spring Boot 2.0.x |
Finchley版本 | 兼容Spring Boot 2.0.x,不兼容Spring Boot 1.5.x |
Greenwich版本 | 兼容Spring Boot 2.1.x |