admin管理员组文章数量:1319578
报错信息如下:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'areaCheckController': Unsatisfied dependency expressed through field 'areaCheckService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'areaCheckServiceImpl': Unsatisfied dependency expressed through field 'projectFileService'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'projectFileServiceImpl': Bean with name 'projectFileServiceImpl' has been injected into other beans [asyncServiceImpl] 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.
从报错信息中可以看到是ProjectFileServiceImpl 、AsyncServiceImpl 这两个中循环注入导致的 检查了下代码雀食是这样。
在AsyncServiceImpl 中注入ProjectFileService
在ProjectFileServiceImpl 中注入AsyncService
造成了循环注入
这里是将AsyncServiceImpl中的ProjectFileService 改为注入ProjectFileMapper问题解决可以启动成功。
根据自己的业务需要进行修改避免业务层的循环引用
本文标签: 错误resultSpringBootmatchingType
版权声明:本文标题:SpringBoot启动报循环依赖错误This is often the result of over-eager type matching - consider using 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/biancheng/1738335604a2076857.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论