使用mybatis时出现异常问题:

有如下的错误

Error querying database.  Cause: org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the Mapped Statement 

(后面内容省略)

 

网上说是oracle不允许插入空值。

但是我没有进行插入操作的,只是进行了查询。

后来看看mybatis的配置文件,漏了一项:resultType属性值

原来的配置是:<select >

修改之后的配置<select >

mybatis中不管什么查询,都必须返回resultType或者resultMap的值,否则就会报错的。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-17
猜你喜欢
  • 2022-01-04
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案