Java Spring 3.2-将@EnableSync添加到@Configuration类时,项目无法加载

Java Spring 3.2-将@EnableSync添加到@Configuration类时,项目无法加载,java,spring,Java,Spring,我需要异步执行bean的一个方法。为此,我在我的bean方法中添加了@Async注释,并在@Configuration注释类上添加了@EnableAsync,但此后,我的项目停止加载,出现以下错误: 错误2014-12-10 17:03:26 org.springframework.web.context.ContextLoader:331-上下文初始化失败 org.springframework.beans.factory.BeanCreationException:创建名为“webSecur

我需要异步执行bean的一个方法。为此,我在我的bean方法中添加了
@Async
注释,并在
@Configuration
注释类上添加了
@EnableAsync
,但此后,我的项目停止加载,出现以下错误:

错误2014-12-10 17:03:26 org.springframework.web.context.ContextLoader:331-上下文初始化失败
org.springframework.beans.factory.BeanCreationException:创建名为“webSecurityConfig”的bean时出错:自动关联依赖项的注入失败;嵌套异常是
org.springframework.beans.factory.BeanCreationException:无法自动连接字段:com.softech.dms.service.DetailService com.softech.dms.config.WebSecurityConfig.DetailService;嵌套异常是
org.springframework.beans.factory.BeanCreationException:创建名为“detailService”的bean时出错:自动连线依赖项的注入失败;嵌套异常是
org.springframework.beans.factory.BeanCreationException:无法自动连接字段:com.softech.dms.service.UserService com.softech.dms.service.DetailService.UserService;嵌套异常是
org.springframework.beans.factory.BeanCreationException:创建名为“userServiceImpl”的bean时出错:自动连线依赖项的注入失败;嵌套异常是
org.springframework.beans.factory.BeanCreationException:无法自动连接字段:com.softech.dms.service.CustomerService com.softech.dms.service.impl.UserServiceImpl.CustomerService;嵌套异常是
org.springframework.beans.factory.BeanCreationException:创建名为“customerServiceImpl”的bean时出错:自动关联依赖项的注入失败;嵌套异常是
org.springframework.beans.factory.BeanCreationException:无法自动连接字段:com.softech.dms.service.FolderServicecom.softech.dms.service.impl.CustomerServiceImpl.folderService;嵌套异常是
org.springframework.beans.factory.BeanCreationException:创建名为“folderServiceImpl”的bean时出错:自动关联依赖项的注入失败;嵌套异常是
org.springframework.beans.factory.BeanCreationException:无法自动连接字段:private com.softech.dms.service.BookmarkService com.softech.dms.service.impl.folderserviceinmpl.bookmarkFolderService;嵌套异常是
org.springframework.beans.factory.BeanCreationException:创建名为“bookmarkServiceImpl”的bean时出错:自动连线依赖项的注入失败;嵌套异常是
org.springframework.beans.factory.BeanCreationException:无法自动连线字段:private com.softech.dms.service.DocumentService com.softech.dms.service.impl.BookmarkServiceImpl.DocumentService;嵌套异常是
org.springframework.beans.factory.BeanCurrentlyIncremerationException:创建名为“documentServiceImpl”的bean时出错:名为“documentServiceImpl”的bean已被注入其他bean中
[documentHistoryServiceImpl,sharedDocumentServiceImpl]在其原始版本中作为循环引用的一部分,但最终已被包装。这意味着说其他豆子不使用
bean的最终版本。这通常是过度热切类型匹配的结果——例如,考虑使用“GeBeNeNeMeFoType”与“LoopeAgEnIIT”标志关闭。
位于org.springframework.beans.factory.annotation.AutoWiredNotationBeanPostProcessor.postProcessPropertyValues(AutoWiredNotationBeanPostProcessor.java:289)
位于org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1146)
位于org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
位于org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
位于org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
位于org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
位于org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
位于org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
位于org.springframework.beans.factory.support.DefaultListableBeanFactory.PreInstanceSingleton(DefaultListableBeanFactory.java:628)
位于org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
位于org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
位于org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
位于org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
位于org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
位于org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
位于org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
位于org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
位于org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566)
位于org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556)
位于java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
在java.util.concurrent.FutureTask.run(FutureTask.java:166)中
位于java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
位于java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
运行(Thread.java:724)
当我删除
@EnableAsync
注释时,一切又恢复了正常。如果我错了,请告诉我
@Autowired
@Lazy(value=true)
MyService servObj;