我想从实体类中选择特定列并忽略方法中的其他列。为此我不能使用 @JsonIgnore 因为在另一种方法中我想调用该实体类中可用的所有列。
@Entity
@Table(name="student")
public class StudentDO {
@Id
@Column(name="studentId")
private int studentId;
@Column(name="studentName")
private String studentName;
@JsonIgnore
@Column(name="studentPlace")
private String studentPlace;
@Column(name="studentstd")
private String studentstd;
现在我想要一个方法,它提供忽略@JsonIgnore 列的数据,另一个方法在调用时提供所有四列,包括带有@JsonIgnore 注释的列。
你能帮我解决这个问题吗
BIG阳
慕妹3242003
相关分类