摘要:
【resultMap】 如果查询出来的列名和pojo的属性名不一致,通过定义一个resultMap对列名和pojo属性名之间做一个映射列表。 1.定义resultMap,(在UserMapper.xml文件中) 2.使用resultMap作为statement的输出映射(该案例在UserMap.xm 阅读全文
摘要:
输出映射主要有两种:resultType和resultMap 【resultType】 可以返回三种类型 pojo对象:例如select * from user where id=? pojo对象列表:例如 select * from user 普通类型: 例如 select count(*) fr 阅读全文