📅  最后修改于: 2022-03-11 14:56:14.888000             🧑  作者: Mango
By default the id in mongo collection is string. To maintain a long id of obejcts in collection, you can choose a separate field as follows:
@Id
@Field("_id")
@JsonIgnore
private String id;
@Field("my_object_id")
private Long myObjectId;