测试实体类字段不一致
public class User {
private int id;
private String username;
private String pwd;
}
与数据库中 name 不一致的字段 username 显示为 null
解决方案
-
起别名
<!--通过ID查询用户-->
测试实体类字段不一致
public class User {
private int id;
private String username;
private String pwd;
}
与数据库中 name 不一致的字段 username 显示为 null
解决方案
起别名
<!--通过ID查询用户-->