首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

Spring 循环倚赖(circular reference)

2012-10-18 
Spring 循环依赖(circular reference)循环依赖一般是由bean的相互依赖引起的,改变相应依赖的关糸即可,一般

Spring 循环依赖(circular reference)
循环依赖一般是由bean的相互依赖引起的,改变相应依赖的关糸即可,一般是设计错误。
一般错误说明如下:
org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'cancelBookingService': Bean with name 'cancelBookingService' has been injected into other beans [bookingProxy] in its raw version as part of a circular reference, but has eventually been wrapped (for example as part of auto-proxy creation). This means that said other beans do not use the final version of the bean. This is often the result of over-eager type matching - consider using 'getBeanNamesOfType' with the 'allowEagerInit' flag turned off, for example.

热点排行