Spring异常总结

1.  Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.ha.service.UserService] found for dependency [com.imut.service.IUserService]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}

  问题:bean自动注入失败了,

  解决办法:检查提示的类是否增加了@Service、@Component等注解,以及启动类或配置文件的扫描包路径,是否包含了这个类的路径。

猜你喜欢

转载自www.cnblogs.com/huanshilang/p/11685147.html