解决SpringBoot中出现org.springframework.beans.factory.UnsatisfiedDependencyException
分类:
文章
•
2024-06-22 10:26:58
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)}
![解决SpringBoot中出现org.springframework.beans.factory.UnsatisfiedDependencyException 解决SpringBoot中出现org.springframework.beans.factory.UnsatisfiedDependencyException](/default/index/img?u=aHR0cHM6Ly9waWFuc2hlbi5jb20vaW1hZ2VzLzE0Mi9hOTg4MjUyNzdiYzU5M2ZhYTQxMTBjYWI2MzIxY2QyNi5wbmc=)
解决方法
在mapper中PlanInfoMapper类下加入@Mapper注解