解決,spring Is there an unresolvable circular reference?

當我們在使用spring的構造注入時可能會遇到如下問題:
Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with 
name 'linkInstanceService': Requested bean is currently in creation: Is there an unresolvable circular reference?
原因是在構造注入時,一旦服務器開啓就會加載,如果我們使用裝配模式就可以解決這個問題。

這裏寫圖片描述

這裏寫圖片描述

發佈了147 篇原創文章 · 獲贊 30 · 訪問量 24萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章