How to enable circular reference in spring framework?

后端 未结 3 1193
故里飘歌
故里飘歌 2020-12-18 16:22

greetings all sometime in my app the logic forces me to use circular reference and i want to know how to enable this configuration in spring ?

3条回答
  •  借酒劲吻你
    2020-12-18 16:38

    Take a look at this article.

    I would advice from the first option there. Circular dependencies are not a good sign and should be avoided. You can create a 3rd, helper class, for example.

    The other two options are workarounds and will be harder to understand and debug later on.

提交回复
热议问题