在springboot 整合mybatis时遇到的bug
org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the
我的mapper.xml语句
<select id="queryCount">
select count(*) from sms.user
</select>
在select中加上返回的结果集映射就可以了
<select id="queryCount" resultTyp="java.lang.Integer">
select count(*) from sms.user
</select>
如果加上int也是会报错的,因为返回类型应该是一个类,而不是一个基本数据类型