Error creating bean with name 'com.xyz.store.StoreApplicationTests':

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.xyz.store.StoreApplicationTests': Unsatisfied dependency expressed through field 'userDao'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.xyz.store.UserDao.UserDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

 

测试类加上全限定名@MapperScan("com.xyz.store.UserDao")
posted @ 2022-12-17 14:16  谢远栋  阅读(20)  评论(0)    收藏  举报