以 jar 包(仅限 Mac 系统)运行项目的时候会报循环依赖的问题

2023-02-22 13:20:36 +08:00
 Aurora0
ERROR main [org.springframework.boot.SpringApplication] Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException:
 Error creating bean with name 'aBeanName': Unsatisfied dependency expressed through field 'zService'; 
 nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: 
 Error creating bean with name 'zServiceImpl': Bean with name 'zServiceImpl' has been injected into other beans 
 [aServiceImpl,bServiceImpl,cServiceImpl,dServiceImpl,eServiceImpl,fServiceImpl] 
 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.

1038 次点击
所在节点    Java
2 条回复
zhaohui318
2023-02-25 20:23:06 +08:00
Aurora0
2023-02-28 19:40:38 +08:00
@zhaohui318 我尝试了一下这个排序,好像还是不行,我弄的自然排序是先排包名再排的类名

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/918218

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX