Idea自动生成序列化ID File -> Settings -> Editor -> Inspections -> 搜索 Serialization issues ,找到 Serializable class without ‘serialVersionUID’ ->打上勾,Apply->OK 参考 [1] IDEA自动生成序列化ID