您的位置:首頁技術文章
文章詳情頁

解決myBatis返回integer值的問題

瀏覽:114日期:2023-10-21 13:32:36

經過測試

resultMap='java.lang.Integer'

改成

resultType='java.lang.Integer'

也可以解決問題~

補充知識:mybatis返回count(*)的整數值

1、mybatis中resultType定義為'java.lang.Integer'

<select resultType='java.lang.Integer'> select count(*) from tableName </select>

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

int selectNums();

以上這篇解決myBatis返回integer值的問題就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持好吧啦網。

標簽: Mybatis 數據庫
相關文章:
国产综合久久一区二区三区