org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘TOrderController’: Unsatisfied dependency expressed through field ‘orderService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘TOrderServiceImpl’: Unsatisfied dependency expressed through field ‘baseMapper’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.my.eduorder.mapper.TOrderMapper’ 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.inject(AutowiredAnnotationBeanPostProcessor.java:639) ~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE]
一般是找不到mapper包,解决方案如下
----------------------------------------------------------------------------------------
检查配置有映射mapper地址且发现mapper包下有两个子包导致映射错误
error0604(org.springframework.beans.factory.UnsatisfiedDependencyException
最新推荐文章于 2024-03-14 22:38:17 发布