SpringBoot A component required a bean of type ‘XXXX‘ that could not be found
一、问题现象
SpingBoot 启动报错: A component required a bean of type ‘XXXX’ that could not be found
二、解决方案
1、pom.xml 增加 openfign 和 loadbalancer 的引用
<!--OpenFeign-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<version>3.1.1</version>
</dependency>
<!--spring-cloud-loadbalancer-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-loadbalancer</artifactId>
<version>3.1.1</version>
</dependency>
还没有评论,来说两句吧...