但当执行时发现 type 属性也被更新了,且为 int 默认值 0。 一顿百度,什么也没查到之后发现 需要设置 实体类 user 的 type 为 Integer,因为 int 不能为 null,而 Integer 可以。
https://blog.csdn.net/weixin_46376562/article/details/126126216