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
就是mapper的方法是返回一个对象,但是数据库查询是一个列表,所以报错。
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
就是mapper的方法是返回一个对象,但是数据库查询是一个列表,所以报错。
转载于:https://my.oschina.net/u/232879/blog/129039