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 标记。

你可能感兴趣的:(Java,spring,boot,spring,java)