您当前的位置: 首页 > 

wu@55555

暂无认证

  • 2浏览

    0关注

    201博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Zuul + nacos 启动报错循环依赖问题The dependencies of some of the beans in the application context form a cycle

wu@55555 发布时间:2021-09-29 10:50:28 ,浏览量:2

项目背景

使用zuul作为网关,nacos作为注册中心,启动报错循环依赖问题。

报错信息
The dependencies of some of the beans in the application context form a cycle:

   org.springframework.cloud.netflix.zuul.ZuulProxyAutoConfiguration (field private org.springframework.cloud.client.serviceregistry.Registration org.springframework.cloud.netflix.zuul.ZuulProxyAutoConfiguration.registration)
┌─────┐
|  nacosRegistration defined in class path resource [com/alibaba/cloud/nacos/registry/NacosServiceRegistryAutoConfiguration.class]
↑     ↓
|  nacosProperties (field private java.util.Optional com.alibaba.cloud.nacos.NacosDiscoveryProperties.nacosAutoServiceRegistrationOptional)
↑     ↓
|  nacosAutoServiceRegistration defined in class path resource [com/alibaba/cloud/nacos/registry/NacosServiceRegistryAutoConfiguration.class]
└─────┘

这里是由于springcloud版本问题,在nacos开源项目中也有人提出这个问题 https://github.com/alibaba/nacos/issues/3932 在这里插入图片描述 通过描述知道,这是spring cloud 2.2.2.RELEASE版本的问题,将版本改为2.2.5.RELEASE 在这里插入图片描述 重新启动,访问接口,成功! 在这里插入图片描述

关注
打赏
1664985904
查看更多评论
立即登录/注册

微信扫码登录

0.0370s