使用Mybatis时出错:A query was run and no Result Maps were found for the Mapped Statement

来源:互联网 发布:杀破狼js为什么下架了 编辑:程序博客网 时间:2024/05/22 08:22
在使用mybatis出现错误:

Caused by: org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the Mapped Statement 'com.ylp.mybatis03.mapper.EmpMapper.getPaginationBean'.  It's likely that neither a Result Type nor a Result Map was specified.


mapper.xml

<select id="getPaginationBean" >select * from (select rownum rn,e.* from (select * from emp ${condition}) e where ${pageNo}*${pageSize} >= rownum) where rn>(${pageNo}-1)*${pageSize}</select>

经过查看,发现是Mapper.xml中出错,在使用select时,没有指定resultType或者resultMap




阅读全文
0 0
原创粉丝点击