.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2

低级码农66 发布于 11/13 19:45
阅读 87
收藏 0

Caused by: org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2
 at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:81)
 at sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)
 ... 122 more

加载中
0
f
freezingsky

意思就是你findOne的时候 , 数据库返回多条或者根据就没有对应的数据!

 连百度都帮不了你吗?

 

返回顶部
顶部
天津时时彩