org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found 解决方法

报错:org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the Mapped Statement 'xxx'.  It's likely that neither a Result Type nor a Result Map was specified.

原因:这是因为使用到的sql查询语句没有返回一般数据类型的值,如下

修改后:加入返回类型 resultType="java.lang.Long",如下

这样问题就解决啦

猜你喜欢

转载自blog.csdn.net/weixin_57997644/article/details/132766203