IDEA在使用MapperScannerConfigurer扫描dao层后,我在service层引用dao层方法时,出现“Could not autowired”,如图:
IDEA dao层“Could not autowired”(已用使用MapperScannerConfigurer扫描)

但是这并不影响运行的,虽然这里”studentMapper”报错,但是照样可以运行,如果想去掉这个红线,可以如下操作:

进入setting,然后依次选择图中框起来部分,最后将第四部的内容改为 warning 即可
IDEA dao层“Could not autowired”(已用使用MapperScannerConfigurer扫描)
IDEA dao层“Could not autowired”(已用使用MapperScannerConfigurer扫描)

相关文章:

  • 2022-12-23
  • 2022-01-20
  • 2022-12-23
  • 2022-02-16
  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
  • 2021-12-16
猜你喜欢
  • 2021-09-06
  • 2022-01-29
  • 2022-01-05
  • 2021-04-30
  • 2022-02-27
相关资源
相似解决方案