MongoTemplate无法依赖问题 如何处理

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

猜你喜欢

转载自blog.csdn.net/LJ_Java_private/article/details/84564626