---
title: "spring 异常"
author: "xu520"
date: "2012-08-24T20:17:00Z"
tags: []
slug: "spring"
draft: false
lastmod: "2012-08-28T20:15:52Z"
id: 1665753
url: "https://xu520.iteye.com/blog/1665753"
---

一、

org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type \[com.itime.dao.FamilyDao] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, mappedName=, description=, name=, type=class java.lang.Object, authenticationType=CONTAINER)}

application里面用的是注解的方式 高手们来尽快解决！！！！！！

解决办法com.itime.dao.FamilyDao 在public class xx{} 前面加上**@Repository**