zoukankan      html  css  js  c++  java
  • Bean with name '' has been injected into other beans [] in its raw version as part of a circular

    1、报错信息

    Unsatisfied dependency expressed through field 'xxxService';
    nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: 
    Error creating bean with name 'xxxServiceImpl': 
    Bean with name 'xxxServiceImpl' has been injected into other beans [yyyServiceImpl] 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.

    2、错误原因:

    xxxService 类中注入了 yyyService , 而在 yyyService 类中也注入了 xxxService 

    3、解决方式:

     xxxService 类注入 yyyService 时,增加注解@Lazy,反之同理。

    注意:

    尽量不要导致循环依赖。

  • 相关阅读:
    高程5.4 RegExp类型
    高程5.3 Date类型
    高程5.2.9归并方法
    20151119js上课总结
    从0~100之间随机取出不重复的10个数
    高程5.2.8迭代方法
    HTML常用标签
    20151118小问题
    20151117小问题
    《QT Creator快速入门》
  • 原文地址:https://www.cnblogs.com/wongzzh/p/15104612.html
Copyright © 2011-2022 走看看