Mybatis结合Spring报错:
org.mybatis.spring.MyBatisSystemException: nested exception is
org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or
null) to be returned by selectOne(), but found: 6 at
org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:92)
at
org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)
at com.sun.proxy.$Proxy8.selectOne(Unknown Source) at
org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:159) at
org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:87) at
org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:152)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:85) at
com.sun.proxy.$Proxy10.queryById(Unknown Source)
解决方法:

检查相关SQL语句

技术
今日推荐
下载桌面版
GitHub
百度网盘(提取码:draw)
Gitee
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:[email protected]
QQ群:766591547
关注微信