调用JPA存储库:
map.put("data",personRepository.findByPersonId(userList.get(0).longValue()));
数据库的响应图为:
{data=User [personId=23334, emailId=abc2@apple.com, firstName=Jack]}
我的DTO:
@Entity
@Table(name = "Person")
public class Person {
private Long personId;
private String emailId;
private String firstName;
}
这是我试图从回复中获取电子邮件的内容,但为空
usersEmailId = (String) map.get("emailId");
从响应映射中获取密钥的代码有什么问题?
沧海一幻觉
相关分类