Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shopServiceTest': Unsatisfied dependency expressed through field 'shopService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.henu.oto.service.ShopService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
-
解决办法
XxxServiceImpl 需要添加注解 @Service