admin管理员组

文章数量:1794759

Consider defining a bean of type ‘org.springframework.cloud.client.loadbalancer.reactive.DeferringLo

Consider defining a bean of type ‘org.springframework.cloud.client.loadbalancer.reactive.DeferringLo

一、背景描述

启动一个springboot项目时,竟然发现项目启动失败,提示信如下: Description:

Parameter 0 of method loadBalancerWebClientBuilderbeanPostProcessor in org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration required a bean of type ‘org.springframework.cloud.client.loadbalancer.reactive.DeferringLoadBalancerExchangeFilterFunction’ that could not be found.

Action:

Consider defining a bean of type ‘org.springframework.cloud.client.loadbalancer.reactive.DeferringLoadBalancerExchangeFilterFunction’ in your configuration.

14:20:01.605 WARN c.a.n.c.http.HttpClientBeanHolder [108] - [HttpClientBeanHolder] Start destroying common HttpClient

Process finished with exit code 1

二、问题原因

原因:springboot版本问题2.4以上有此问题

三、解决方案

添加负载均衡

<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-loadbalancer</artifactId> </dependency>

本文标签: orgspringframeworktypedefiningbean