Spring Boot和Zuul代理deferringLoadBalancerexChangeFilterFilterFunction错误
我有一个简单的应用程序,该应用程序使用Netflix Zuul作为API网关,
我在pom.xml文件中添加了Zuul依赖性,如下所示:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
<version>2.2.10.RELEASE</version>
</dependency>
和@enableZuulProxy
应用程序的主要类别的
问题,问题是每当我尝试运行API,它无法启动并在控制台中显示:
考虑定义一种类型的豆 'org.springframework.cloud.client.loadbalancer.reactive.deferringloadbalancerexchangefilterfilter'' 在您的配置中。
我无法解决问题,有什么问题?
I have a simple app that uses Netflix Zuul as an API gateway
I added the Zuul dependency in the pom.xml file as follows:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
<version>2.2.10.RELEASE</version>
</dependency>
and @EnableZuulProxy
for the main class of the app
The problem is that whenever I try to run the API, It fails to start and shows in the console:
Consider defining a bean of type
'org.springframework.cloud.client.loadbalancer.reactive.DeferringLoadBalancerExchangeFilterFunction'
in your configuration.
I couldn't solve the issue, what's the problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当我在pom.xml中添加以下依赖性时,解决了问题:
结果,Spring还要求我将其添加到我的应用程序配置中:
然后,我的API成功运行而不会失败或抛出任何例外
The issue was solved when I added the following dependency in pom.xml:
and as a result, spring also asked me to add this to my app configuration:
Then my API ran successfully without failing or throwing any exception