10:39:11,102 ERROR log:88 - handleException error:server_error|服务器异常
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2
由错误提示可知,查询的结果是期望一条记录或者为空,但是返回的记过有2条。
解决方案:检查Mybatis配置文件中返回的结果类型与Java中返回类型是否一致。
Mybatis配置文件中返回的结果类型与Java中返回类型是否一致问题
最新推荐文章于 2020-04-27 23:47:59 发布