IDEA @Autowired dao大红波浪线

SptingBoot+Mybatis开发通常在dao层的注解是@Mapper

这样每次在ServiceImpl层加注解@Autowired时,注入的dao总是波浪线烦人,其实并没有错,只是idea你太严格了

强迫症可能就是要解除掉这个红波浪线

步骤:

File-Settings-Editor-Inspectiopns

右侧找到Spring-Spring Core-Code-Autowiring for Bean Class

右侧的Severity级别显示Error调整到你想要的级别即可

原文地址:https://www.cnblogs.com/yb38156/p/10016911.html