Expected one result (or null) to be returned by...

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的方法是返回一个对象,但是数据库查询是一个列表,所以报错。

你可能感兴趣的:(Expected one result (or null) to be returned by...)