在IDEA使用@Autowired 注入Mapper接口层的时候,无法识别Mapper,出现红色下划线警告
解决方案:springboot-mybatis框架注解和spring框架的注解差异导致IDEA编译器认为"mapper"为null
方法一:@Autowired 注解设置required = false
方法二:@Resource代替@Autowired
方法三:在Mapper接口上加上@Repository注解

在IDEA使用@Autowired 注入Mapper接口层的时候,无法识别Mapper,出现红色下划线警告
解决方案:springboot-mybatis框架注解和spring框架的注解差异导致IDEA编译器认为"mapper"为null
方法一:@Autowired 注解设置required = false
方法二:@Resource代替@Autowired
方法三:在Mapper接口上加上@Repository注解