Could not autowire field: private com.hyq.search.service.AddItemToSolrByActiveMQ com.hyq.search.activemq.ItemAddMessageListener.activeMQ; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.hyq.search.service.AddItemToSolrByActiveMQ] 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)}
这各原因是因为没有添加注解,不能实例化。应该在相应的实现类上添加注解