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

查看 19|回复 0
作者:Aurora0   
  • 经过测试,Windows 系统打的 jar 包可以正常运行,Mac 下 idea 调试也可以正常启动

    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.
  • 实际循环依赖的报错更多,这个 bug 也太奇怪了
  • 您需要登录后才可以回帖 登录 | 立即注册

    返回顶部