A component required a bean of type ‘XXX‘ that could not be found

解决这个问题的方法很简单,只需要检查问题类上是否标注了SpringBoot可以自动扫描的注解,比如缺失了@Service、@Component、@Mapper等,如果是这个原因,直接添加上响应的注解就可以解决了。