Error creating bean with name 'assetQueryController': Injection of autowired dependencies failed; ne

启动tomcat出现一下错误:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘assetQueryController’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.ffcs.crmd.intf.api.facade.ICrmdToCrmFacade com.ffcs.crmd.asset.control.AssetQueryController.crmdToCrmFacade; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.ffcs.crmd.intf.api.facade.ICrmdToCrmFacade] 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.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
百度解释:原因一般是在autowire时,找不到相应的类,上述问题是因为XXXXX的实现类中没有加相应的注解。如dao层 @Repository 如service层 @Service

猜你喜欢

转载自blog.csdn.net/luuvyjune/article/details/77413080