Springboot No qualifying bean of type ‘xxx.xxx‘ available

这里写自定义目录标题

  • Springboot 运行error
    • 运行时错误信息

Springboot 运行error

运行时错误信息

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'odsHzAdmPermitServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.zhjk.api2db.mapper.OdsHzAdmPermitMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660)at o

No qualifying bean of type ‘xxx.xxx’ available: expected at least 1 bean which qualifies as autowire candidate;

原因:没有将相关类注入到springboot

解决:
对相应的实现mapper类 添加@Mapper 标记。


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部