Intellij Idea上做 Spring Boot + mybatis项目

解决Intellij Idea Spring Boot Mybatis @Autowired报错的问题解决Intellij Idea Spring Boot Mybatis @Autowired报错的问题

一直提示 Could not Autowire. 虽然不影响工作,但心理抓狂。

Google提出降低 spring 的 Could not autowire 的报警等级。但是治标不治本。 困扰了几天。如下图:

解决Intellij Idea Spring Boot Mybatis @Autowired报错的问题

解决办法:在每个mapper接口上添加

@Repository注解,瞬间解决!

相关文章:

  • 2021-07-16
  • 2021-10-28
  • 2022-01-01
  • 2021-06-05
  • 2022-12-23
  • 2021-06-27
  • 2021-08-13
猜你喜欢
  • 2021-11-04
  • 2021-09-30
  • 2021-06-08
  • 2021-06-03
  • 2021-04-26
  • 2022-01-13
  • 2021-04-09
相关资源
相似解决方案