开发问题:Expected one result (or null) to be returned by selectOne(), but found: 3

在查找方法中,想要通过id获取一行数据,结果报这个错误,

网上搜索发现可能是需要

将代码:

public RaFactor findValuebyId(Long Id)

改为:

public List<RaFactor >findValuebyId(Long Id)

我的问题是因为测试数据时,数据库数据有多条id相同,尬死!

原文地址:https://www.cnblogs.com/jinseliunian/p/15184159.html