1、mybatis中resultType定义为"java.lang.Integer"

<select >
    select count(*) from tableName
  </select>
mybatis返回count(*)的整数值

2、接口中返回值写成int,即可

int selectNums();
mybatis返回count(*)的整数值

 

欢迎关注微信公众号“Java面试达人”,(id:javasuperman),收看更多精彩内容

mybatis返回count(*)的整数值

mybatis返回count(*)的整数值

相关文章: