测试repository出现异常
来源:4-1 买家类目-dao(上)
weixin_慕圣2348530
2019-03-23
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.imooc.Dao.ProductCategoryRepository’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
写回答
2回答
-
weixin_慕圣2348530
提问者
2019-03-23
自己解决了,主要是没有把@SpringBootApplication修饰所在的类放在com.imooc根目录下面,导致项目测试
时候,项目启动时候Reposity持久层类没有被Spring容器扫描到
10 -
廖师兄
2019-03-24
采纳答案吧
00
相似问题