1、Mapper 接口方法名和 mapper.xml 中定义的每个 sql 的 id 相同;

2、Mapper 接口方法的输入参数类型和 mapper.xml 中定义的每个 sql 的
parameterType 的类型相同;

3、Mapper 接口方法的输出参数类型和 mapper.xml 中定义的每个 sql 的
resultType 的类型相同;

4、Mapper.xml 文件中的 namespace 即是 mapper 接口的类路径。

使用 MyBatis 的 mapper 接口调用时有哪些要求?

相关文章:

  • 2023-04-10
  • 2021-07-27
  • 2021-10-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-03-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案