原因:
UserMapper 不能为spring容器解析;
解决方案:
1.required=false;
2.@Resource替换@Autowired (常见面视题)
3.在Mapper上加上@Component,(@Repository,@Component,@Service,@Controller的区别与联系);
4.使用lombok的 @RequiredArgsConstructor(onConstructor= @__(@Autowired));
5.按照mybatis - plugins;
mapper与idea不兼容抛红的处理
猜你喜欢
转载自blog.csdn.net/qq_36285943/article/details/96470184
今日推荐
周排行