IDEA设置提示生成序列化ID
背景:
实现Serializable接口的类,没有提示生成序列化ID
解决问题:
1.FIle->Settings->Editor->inspections
2.点击java->Serialization issues,勾选Serialization class without 'serialVersionUID'
3.实现序列化接口的类,鼠标放在类名上或者alt+enter,添加序列化ID
- 3.1 鼠标放在类名上,点击Add 'SerialVersionUID' field
- 3.2 alt+enter,点击Add 'SerialVersionUID' field