Idea解决Mapper注入爆红问题
@Autowired
private BrandMapper brandMapper;
以上代码brandMapper经常爆红,程序却能正常运行,经度娘搜索后得出完美解决方案。网址链接:https://blog.csdn.net/Coder_Knight/article/details/83999139
Mapper文件中添加@Repository注解。
例如
@Repository
public interface BrandMapper extends Mapper<Brand> {
}