寻找spring bean之间循环依赖关系的良好实践

Sim*_*eon 8 java spring circular-dependency

我有这个例外:

SEVERE: Context initialization failedorg.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'myService': Bean with name 'myService' has been injected into other beans [otherService] in its raw version as part of a circular reference, but has eventually been wrapped. 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.
Run Code Online (Sandbox Code Playgroud)

任何人都可以建议找到循环依赖来源的好策略吗?

我目前正在查看上下文定义,但正如您可能想象的那样,在某个成熟度的项目中,这需要相当长的时间.

所以我一般都在寻找快速找到循环bean依赖关系的想法.

Gra*_*ray 6

这是宣传依赖图生成的2个工具.然而,我对他们没有任何经验.