update 更新 自定义主键案例

This commit is contained in:
疯狂的狮子li
2021-06-16 19:40:59 +08:00
parent c3636f1527
commit 0d9fb68a04
3 changed files with 13 additions and 4 deletions

View File

@ -27,8 +27,6 @@ public class TestDemo implements Serializable {
/**
* 主键
* 如果是自定义id 或者 雪花id
* 需要增加序列化为字符串注解 因为Long到前端会失真
*/
@TableId(value = "id")
@JsonSerialize(using = ToStringSerializer.class)