Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.xxx.LanguageRecognizeService] found for dependency [com.xxxxxx.LanguageRecognizeService]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
一般这种错误是找不到bean的定义,没有引入xml文件。
还有一种报错是no class found。是有xml文件,但是没有加载jar包到classpath等,是pom没有依赖,或者冲突,或者依赖了低版本。
本文解析了Spring框架中出现的NoSuchBeanDefinitionException异常原因及解决办法。主要涉及未正确配置bean定义、未引入XML配置文件、ClassPath缺少必要的jar包等问题。
5327

被折叠的 条评论
为什么被折叠?



