Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.thinkgem.jeesite.modules.flightticket.service.OrderBatchImportCtripSchedule com.thinkgem.jeesite.modules.flightticket.web.OrderController.orderBatchImportCtripSchedule; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'orderBatchImportCtripSchedule': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.data.mongodb.core.MongoTemplate com.thinkgem.jeesite.modules.flightticket.service.OrderBatchImportCtripSchedule.mongoTemplate; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.data.mongodb.core.MongoTemplate] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:561)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
... 54 more
MongoTemplate无法依赖问题 如何处理
最新推荐文章于 2024-09-04 16:32:42 发布
本文详细分析了Spring框架中依赖注入失败的错误日志,解释了由于找不到合适的MongoTemplate Bean而导致OrderBatchImportCtripSchedule服务无法正确创建的问题,并探讨了解决方案。
1万+

被折叠的 条评论
为什么被折叠?



