@Autowire标签下,属性报红

无法编译时

由于无法找到对应的造成的
1.检查mapper.xml文件的namespace是否正确。
2.在@SpringBootApplication,上添加@MapperScan(“relativepath”)。此处的relativepath,是mapper接口的路径,而不是mapper.xml的路径
3.检查application中mybatis的mapper.xml文件的路径

可以编译时

就不用管了,看着难受,就alt+enter打开界面
@Autowire标签下,属性报红

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-01
  • 2021-07-08
猜你喜欢
  • 2021-05-30
  • 2022-02-08
  • 2022-12-23
  • 2022-01-24
  • 2021-11-20
  • 2021-06-13
  • 2021-12-15
相关资源
相似解决方案