mybatis报错spring.MyBatisSystemException

来源:互联网 发布:计算机二级vb上机题库 编辑:程序博客网 时间:2024/05/16 11:44

spring.MyBatisSystemException: nested exception is org.apache

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.TooManyResultsExcep

等错误,

这些错误是因为取值你想要的只是数据库的一列数据,但mybatis根据查询结果返回多列结果。

解决方法分两个:加条件选择一列结果,或者改返回结果类为list

0 0
原创粉丝点击