2013年9月11日星期三

Injection of resource dependencies failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customBlackListService': Injection of resource dependencies failed; nested exception is org.springframework. beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.wondershare.router.dao.CustomBlackListDao] 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)}


not find dependent dao, what is the reason , spring3 automatic annotation , why not find . code below
@ Repository ("customBlackListDao")
public class CustomBlackListDaoImpl extends GeneralDaoSupport implements CustomBlackListDao {

- what is the service called dao code
@ Service ("customBlackListService")
public class CustomBlackListServiceImpl implements CustomBlackListService {
@ Resource
private CustomBlackListDao customBlackListDao;

------ Solution ------------------------------------ --------
beans in xml there are no
?
------ For reference only ------------ ---------------------------


------ For reference only ------- --------------------------------
is to scan the package path problem , do not know when the hot-headed , was I get rid of the

没有评论:

发表评论