spring 注入失败 大神求教
spring吧
全部回复
仅看楼主
level 1
电池baby 楼主
springMVC配置
application-context配置
web.xml
程序 注解
启动项目
Error creating bean with name 'userAction': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private jyp.user.service.UserService jyp.user.action.UserAction.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private jyp.user.dao.UserDao jyp.user.service.UserService.userDao; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [jyp.user.dao.UserDao] 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)}
7
2017年02月09日 04点02分 1
level 1
项目结构贴出了
2017年02月13日 06点02分 17
level 4
创建bean错误
2017年03月10日 04点03分 19
level 1
UserService 里面自动装配usrDao时出错,你是不是useDao这个类没有注解
2017年03月16日 15点03分 20
level 6
同意楼上
2017年03月16日 16点03分 21
level 1
扫描包不对,父子容器知道吧,classpath*是什么意思?
2017年03月17日 03点03分 22
level 2
检查下service层 dao层注解
2017年03月31日 04点03分 23
level 3
dao没有bean或者没注解
2017年03月31日 09点03分 24
1