一、设置步骤
File -> Settings -> Editor -> Inspections -> 搜索 Serialization issues ,找到 Serializable class without ‘serialVersionUID‘ ->打上勾,Apply->OK
二、新建文件
public class ResultDto<T> implements Serializable { }
三、自动生成
效果:
public class ResultDto<T> implements Serializable { private static final long serialVersionUID = -992382868625546486L; }