当前位置: 代码迷 >> 综合 >> Error creating bean with name 'xxx': Injection of resource dependencies failed的解决办法
  详细解决方案

Error creating bean with name 'xxx': Injection of resource dependencies failed的解决办法

热度:0   发布时间:2023-12-07 22:08:41.0

问题

运行项目的后端代码,出现如下错误:
在这里插入图片描述
即:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘signInController’: Injection of resource dependencies failed;
nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name ‘signInService’: Bean with name ‘signInService’ has been injected into other beans [signInService] 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.

解决

可以看到“signInService”、“circular reference”,说明应该是signInService的调用出现了问题,出现了“自己调用自己”的情况。再仔细看看SignInServiceImpl,发现它调用了自己的接口层SignInService,所以出错了。
在这里插入图片描述

收获

遇到问题莫要慌,仔细看看问题,看看它在说啥,静下心来就能解决啦~向雅雯姐比心?( ????` )

  相关解决方案