以前的 java 对象:
@Value
@Wither
@Builder(toBuilder = true)
@NoArgsConstructor(force = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class person {
String id;
// @BsonIgnore
String username;
// @BsonIgnore
String fullName;
@BsonCreator
public DataDomainOwner(
@BsonProperty("id") final String id,
@BsonProperty("username") final String username,
@BsonProperty("fullName") final String fullName
) {
this.id = id;
this.username = username;
this.fullName = fullName;
}
}
新模型是:
@Value
@Wither
@Builder(toBuilder = true)
@NoArgsConstructor(force = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class person {
String id;
// @BsonIgnore
String username;
// @BsonIgnore
String fullName;
boolean acting;
@BsonCreator
public DataDomainOwner(
@BsonProperty("id") final String id,
@BsonProperty("username") final String username,
@BsonProperty("fullName") final String fullName,
@BsonProperty("status") final boolean status
) {
this.iId = id;
this.username = username;
this.fullName = fullName;
this.status = status;
}
}
有人可以帮忙吗?