Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException 怼烎@ 2022-04-15 05:27 156阅读 0赞 错误信息提示: Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.********.qrcode.redis.RedisUtil' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} 分析: No qualifying bean of type 'com.\*\*\*\*\*\*\*\*.qrcode.redis.RedisUtil' 说明没有找到这个bean,所以就要考虑spring是否扫描到了的问题: 解决方法:在spring配置文件添加包扫描 <context:component-scan base-package="com.***.qrcode.redis"/>
还没有评论,来说两句吧...