解决SpringBoot中出现org.springframework.beans.factory.UnsatisfiedDependencyException

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘com.hikvision.coal.test’: Unsatisfied dependency expressed through field ‘planInfoMapper’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.hikvision.coal.mapper.PlanInfoMapper’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

在这里插入图片描述

解决方法

在mapper中PlanInfoMapper类下加入@Mapper注解

猜你喜欢

转载自blog.csdn.net/qq_38530648/article/details/108885329