spring注解报错 Error creating bean

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService1': Injection of resource fields failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [dao.UserDao] is defined: Unsatisfied dependency of type [interface dao.UserDao]: expected at least 1 matching bean

第1个回答  推荐于2017-04-22
你在userService这个bean里注入的userDAO没有找到对应的<bean>。
检查你的userDAO这个类是否加入了Annotation配置,注入的名称是否匹配。

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网