指定Java 实体字段序列化类型

 使用注解:

 @JsonSerialize(using = ToStringSerializer.class)
@Data
@ApiModel("跟进实体")
public class FollowVo {

    @ApiModelProperty(value = "跟进id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "跟进方式")
    private Long promWay;
}

  

posted on 2021-01-28 17:25  滚动的蛋  阅读(402)  评论(0编辑  收藏  举报

导航