运行测试的时候报错

来源:5-4 Mybatis的Xml方式使用

慕侠9031100

2021-03-15

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

但是我的路径和类名都是正确的 请问如何解决

写回答

1回答

廖师兄

2021-03-21

可能是mapper文件路径没设置对

0
0

实战支付+电商双系统 玩转Java技术栈

花一份课的价,收获:双系统实战+坐拥20K+粉的师兄指导,值~

2046 学习 · 1048 问题

查看课程