使用 MyBatis 的 mapper 接口调用时有哪些要求?
时间:2020-07-20 22:13:40
收藏:0
阅读:89
1、Mapper 接口方法名和 mapper.xml 中定义的每个 sql 的 id 相同;
2、Mapper 接口方法的输入参数类型和 mapper.xml 中定义的每个 sql 的
parameterType 的类型相同;
3、Mapper 接口方法的输出参数类型和 mapper.xml 中定义的每个 sql 的
resultType 的类型相同;
4、Mapper.xml 文件中的 namespace 即是 mapper 接口的类路径。
原文:https://www.cnblogs.com/programb/p/12996206.html
评论(0)