org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.wh.

org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.wh.service.UserService] 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)}

org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.wh.
 

今天在运行SSH时报了一个这个错误,翻译了一下是:org.springframework.beans.factory。NoSuchBeanDefinitionException:没有符合条件的[com.wh.service]类型的bean。UserService]为依赖项找到:期望至少有一个bean可以作为这个依赖项的autowire候选。依赖注释:{@org.springframework.beans.factory.annotation.Autowired(要求= true)}。

Autowired注入

org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.wh.

找了很久发现是

org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.wh.

实现类中没有写这个