xxxservice中添加了@Async的注解导致的循环依赖

Error creating bean with name 'xxxxService': Bean with name 'xxxxService' has been injected into other beans [.....] 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.
 
 
最后发现是在xxxservice中添加了@Async的注解导致的。
 
 
最后再附上搜索到的一篇为什么会出现这种情况的博客:
https://www.jb51.net/article/185794.htm
https://blog.csdn.net/qq_42435377/article/details/114382591

 

原文地址:https://www.cnblogs.com/suizhikuo/p/14723492.html