A query was run and no Result Maps were found for the Mapped Statement 'com.hhwy.epes.review.ot

仔细查看mybatis的配置文件,发现遗漏一个属性:resultType

报错的配置是:<select id="ID"  parameterType="java.util.Map">
正确的配置应该是<select id="ID" parameterType="java.util.Map" resultType="java.util.Map">

A query was run and no Result Maps were found for the Mapped Statement 'com.hhwy.epes.review.ot

 

 最后总结下,就是mybatis中的所有查询,都必须返回resultType或者resultMap的值,否则就会报如上错误的

A query was run and no Result Maps were found for the Mapped Statement 'com.hhwy.epes.review.ot

 

上一篇:ParameterType和resultType的区别


下一篇:mybatis报错java.lang.UnsupportedOperationException