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配置,注入的名称是否匹配。
检查你的userDAO这个类是否加入了Annotation配置,注入的名称是否匹配。