mybatis返回一个int型数组,在xml中的resultType应该怎么写?
我的需求是查询表中一个字段的所有数据,如果有其他方法也可以!!
so easy.
select 字段名 from 表名
resultType用int就可以了,之前是自己想错了,用了List!
<select id="functionName" resultType="int">
select column from table_name where XXXXX
</select>
可以调用selectList方法可以返回List类型