最近学习Spring-boot + Mybatis,发现强大的idea的居然没法识别注入的Mapper,@Autowired 后直接报错。

Idea @Autowired注入 Mapper报错

虽然不影响项目运行但是红色error辣眼睛,最后找到在@Mapper注解后面添加@Repository,不用去粗暴关闭idea中Autowired不成功的提示了,毕竟智能提示是idea一大利器。

Idea @Autowired注入 Mapper报错

最后在原来报错的地方,消失了,idea在我心中的形象又高大了起来!

相关文章:

  • 2022-01-13
  • 2022-12-23
  • 2021-05-17
  • 2022-12-23
  • 2022-12-23
  • 2023-03-31
  • 2021-05-19
猜你喜欢
  • 2021-05-24
  • 2022-12-23
  • 2021-04-23
  • 2022-12-23
  • 2021-12-16
  • 2021-06-09
  • 2022-12-23
相关资源
相似解决方案