雪花算法生成的主键太长,js精度丢失怎么办?

实体类Long属性转为string

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

前端在发送回数据时,也要做处理:

JSON.stringify({
            'id': id,
            'name': data
        })

猜你喜欢

转载自blog.csdn.net/qq_38974073/article/details/114648172
今日推荐