.. UserService] 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 org.
解决方案:
在serviceImpl 类上加注解
@Service()
本文介绍了解决在Spring框架中UserService依赖注入失败的问题。当尝试注入UserService时,系统未能找到符合条件的候选Bean。通过在ServiceImpl类上添加@Service注解,成功解决了这一问题。
1447

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



