小编Muh*_*eed的帖子

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

我需要异步执行我的 bean 的方法。为此,我将@Async注释添加到我的 bean 方法和@EnableAsync@Configuration注释的类中,但从那时起,我的项目已停止加载,并出现以下错误:

ERROR 2014-12-10 17:03:26 org.springframework.web.context.ContextLoader:331 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webSecurityConfig': Injection of autowired dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.softech.dms.service.DetailService com.softech.dms.config.WebSecurityConfig.detailService; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'detailService': Injection of autowired dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.softech.dms.service.UserService com.softech.dms.service.DetailService.userService; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userServiceImpl': Injection of autowired dependencies …
Run Code Online (Sandbox Code Playgroud)

java spring

1
推荐指数
1
解决办法
3520
查看次数

标签 统计

java ×1

spring ×1