首页
Python
Java
前端
数据库
Linux
Chatgpt专题
开发者工具箱
qualifies专题
spring@Autowired注解expected at least 1 bean which qualifies as autowire candidate错误
上午改了一下项目运行开始这个错误 先看错误提示修改,找到配置文件的问题 注入问题,由于有两个类实现了xx,所以Spring不知道应该绑定哪个实现类,所以抛出了如上错误。 这时候就得用到@Qualifier("xxxx")注解了 通过这个注解表明了哪个类才是我们需要的。 添加完注解后运行,出现新的问题,提示找不到注解的类 就添加了自动扫描这个类的包路径 运行还是提示这个错误,继续找原因
阅读更多...
found for dependency: expected at least 1 bean which qualifies as autowire candidate for this depend
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
阅读更多...
at least 1 bean which qualifies as autowire candidate
No qualifying bean of type 'com. spdbcccdl.mapper.dl.DatabaseDaoavailable: expected at least 1 bean which qualifies as autowire candidate.
阅读更多...