这个错误就是因为springboot的版本更新,有些类的路径发生了变化,java
解决办法:spring
使用不一样的springcloud版本springboot
例如:spring-boot
我使用的springboot的版本spa
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
</parent>
当我使用springcloud的版本为code
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Brixton.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
会出现异常。blog
只需修改成ci
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Dalston.SR1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
就OK了springcloud
欢迎关注个人公众号“码上开发”,天天分享最新技术资讯、最优原创文章。关注获取最新资源资源