问题情境:
简单的项目采用了若依的前后端分离版本单体应用,之前采用forest请求调用第三方接口,改为feign接口调用后,引入feign报错
error creating bean with name ‘configurationPropertiesbean’
解决方案:
springboot版本和springcloud版本不一致导致
修改pom文件
<properties><spring-cloud.version>2020.0.4</spring-cloud.version>
</properties><dependencies><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-openfeign</artifactId></dependency>
</dependencies><dependencyManagement><dependencies><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-dependencies</artifactId><version>${spring-cloud.version}</version><type>pom</type><scope>import</scope></dependency></dependencies>
</dependencyManagement>
问题解决,版本对照可参考
Spring Cloud Version Spring Boot Version
2022.0.x aka Kilburn 3.0.x
2021.0.x aka Jubilee 2.6.x, 2.7.x (Starting with 2021.0.3)
2020.0.x aka Ilford 2.4.x, 2.5.x (Starting with 2020.0.3)
Hoxton 2.2.x, 2.3.x (Starting with SR5)
Greenwich 2.1.x
Finchley 2.0.x
Edgware 1.5.x
Dalston 1.5.x