异常问题:出现太多结果集异常,意思是当前方法要求返回一个结果,但实际却查到了2个或2个以上的相同结果
org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2
解决方法:
原mapper接口方法
Admin checkLogin(String username,String password);
修改后mapper接口方法,将原来的方法返回类型改为list<T>
List<Admin> checkLogin(String username,String password);