你好,请问下有没有遇见如下错误:
问题描述:
在写完测试类ProductInfoRepositoryTest ,查询所有在架商品findByProductStatus(),debug启动运行findByProductStatus()时报错
错误信息:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘com.imooc.product.repository.ProductInfoRepositoryTest’: Unsatisfied dependency expressed through field ‘productInfoRepository’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.imooc.product.repository.ProductInfoRepository’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
SpringCloud组件实现微服务,【已升级Finchley.Release】
了解课程