随笔,springboot 循环依赖

Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
[neo-crm][172.17.0.1:8011::] 2022-06-08 15:04:08.398:[ERROR] [1] [main:17754] [org.springframework.boot.SpringApplication.?:?] Application run failed

org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name ‘orderAsyncServiceImpl’: Bean with name ‘orderAsyncServiceImpl’ has been injected into other beans [neoCrmOrderServiceImpl] 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.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:623)     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)     at org.springframework.beans.factory.support.AbstractBeanFactory.lambda0(AbstractBeanFactory.java:324)     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)     at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)     at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)     at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)     at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405)     at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)     at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)     at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)     at org.neoscholar.JeecgCrmCloudApplication.main(JeecgCrmCloudApplication.java:46)     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.base/java.lang.reflect.Method.invoke(Unknown Source)     at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)     at org.springframework.boot.loader.Launcher.launch(Launcher.java:107)     at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)     at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)  

正文完