Hibernate+Spring MVC实现登录注册模块时爆出的异常:

``` org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [/data/ideaproject/test_ssh/out/artifacts/test_ssh_war_exploded/WEB-INF/classes/com/tgb/dao/UserDao.class]; nested exception is java.lang.IllegalArgumentException at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:281) at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:242) at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84) ```

macg - 80后IT男

赞同来自: @CrazyChao

spring依赖注入的时候发生的错误,注入的参数类型不匹配. 这类spring注入的错误比较难调,因为他即使错了,也没有红叉,只有真正执行的时候才出错. 你这段代码大概从哪粘贴来,直接放在自己代码里引用. 还是要认真看分析代码.

要回复问题请先登录注册