admin管理员组文章数量:1534194
1.报错内容:
Error creating bean with name ‘metaTableColumnsServiceImpl’: Bean with name ‘metaTableColumnsServiceImpl’ has been injected into other beans [metaTableServiceImpl] 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 ‘getBeanNamesForType’ with the ‘allowEagerInit’ flag turned off, for example.
hua
2原因: metaTableColumnsServiceImpl类中注入了 metaTableServiceImpl, 而在 metaTableServiceImpl类中也注入了 metaTableColumnsServiceImpl,从而引起该异常。 (循环引用)
3、解决: metaTableColumnsServiceImpl类注入 metaTableServiceImpl时,增加注解 @Lazy ,反之同理。
4、@Lazy 注解路径为: org.springframework.context.annotation.Lazy 。
本文标签: 报错beanExceptionSpringxxx
版权声明:本文标题:【Exception】Spring报错:Bean with name ‘xxx‘ has been injected into other beans [xxx] in its raw version 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dianzi/1726873033a1088050.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论