首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

Spring源码解析(十)分析一个Spring循环引用失败的问题

resolve reference to bean 'circulationa' while setting bean property 'circulationA'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException...resolve reference to bean 'circulationa' while setting bean property 'circulationA'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException...resolve reference to bean 'circulationa' while setting bean property 'circulationA'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException...org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351) ... 17 more Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException

75140

再谈spring的循环依赖是怎么造成的?

resolve reference to bean 'loginService' while setting bean property 'loginService'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException...resolve reference to bean 'loginService' while setting bean property 'loginService'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException...org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351) ... 44 moreCaused by: org.springframework.beans.factory.BeanCurrentlyInCreationException...resolve reference to bean 'loginService' while setting bean property 'loginService'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException...resolve reference to bean 'loginService' while setting bean property 'loginService'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException

64940
您找到你想要的搜索结果了吗?
是的
没有找到

使用@Async异步注解导致该Bean在循环依赖时启动报BeanCurrentlyInCreationException异常的根本原因分析,以及提供解决方案【享学Spring】

本以为能够像解决事务不生效问题一样依旧屡试不爽,但没想到非常的不给面子,启动即报错: org.springframework.beans.factory.BeanCurrentlyInCreationException...AInterface a; @Override public void funB() { a.funA(); } } 如上示例代码启动时会报错:(示例代码模仿成功) org.springframework.beans.factory.BeanCurrentlyInCreationException...Service public class A implements AInterface { ... } 这样干预能够保证B肯定在A之前初始化,然后启动也就会报同样错误:(当然此处报错信息是bean b): org.springframework.beans.factory.BeanCurrentlyInCreationException

14.3K94

扫码

添加站长 进交流群

领取专属 10元无门槛券

手把手带您无忧上云

扫码加入开发者社群

热门标签

活动推荐

    运营活动

    活动名称
    广告关闭
    领券