时间:2021-05-04 10:48:35 | 栏目:JAVA代码 | 点击:次
经过测试
将
resultMap="java.lang.Integer"
改成
resultType="java.lang.Integer"
也可以解决问题~
补充知识:mybatis返回count(*)的整数值
1、mybatis中resultType定义为"java.lang.Integer"
<select id="selectNums" resultType="java.lang.Integer"> select count(*) from tableName </select>
2、接口中返回值写成int,即可
int selectNums();