构建eureka-server异常
ClassNotFoundException: org.springframework.boot.context.embedded.FilterRegistrationBean
这个错误就是由于springboot的版本更新,有些类的路径发生了变化
解决办法:
使用不同的springcloud版本。
例如:使用的springboot的版本
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.5.8.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent>
使用springcloud的版本为
<dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>Brixton.RELEASE</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies>
这时,会出现异常。需修改cloud版本号为如下信息即可:
<dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>Dalston.SR1</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies>