springboot启动报错:今天使用junit测试时报错
Error creating bean with name ‘hosinfoServiceImpl’: Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.xlb.mapper.HosinfoMapper’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=“”, name=“”, description=“”, authenticationType=CONTAINER, type=java.lang.Object.class, mappedName=“”)}
首先考虑是不是springboot启动查询中扫描包有误
一目了然,少了一个mapper
输出正常