报错信息:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 35
原因是:你想要返回一条结果,但是却查到了35条结果,所以报错。
将检查xml文件哪条sql语句书写有问题,或返回结果映射不正确。

博客指出MyBatis出现org.mybatis.spring.MyBatisSystemException嵌套TooManyResultsException错误,原因是使用selectOne()期望返回一条结果,实际查到35条。建议检查xml文件中SQL语句书写及返回结果映射是否存在问题。
5160

被折叠的 条评论
为什么被折叠?



