0
Spring circle reference resolution
Quite strange for me... I am a newer in Spring, and still didn’t use to it’s “think for us” logic 😅 How can we solve a problem with two beans that inject each other in configuration .xml file? The compiler prints an error of “circle reference”, meaning that the other bean is still “under construction”? Doesn’t happen in “classy” java api 🙈
1 Antwort
+ 1
It can be fixed by using setter injection.
We can also use @Lazy at constructor injection point