0 0

springmvc+mybatis启动tomcat报异常?0

Error creating bean with name 'personBizImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.springmvc.dao.PersonDao com.springmvc.biz.impl.PersonBizImpl.personDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personDaoImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.springmvc.mapper.PersonMapper com.springmvc.dao.impl.PersonDaoImpl.mapper; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.springmvc.mapper.PersonMapper] 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)}
自己看是注入时的错误?希望大牛指教!
2014年3月05日 15:30

1个答案 按时间排序 按投票排序

0 0

如果你采用注解配置 那么就是类上面没有打标记 Spring没管理你注入的类
如果是用XML配置 那么你的BEAN需要配置到XML当中

也就是说你的PersonDao 没有被Spring管理

2014年3月05日 16:06

相关推荐

Global site tag (gtag.js) - Google Analytics