File >> Setting >> Inspections >> serializable
勾选上后,光标放在实现Serializable接口的类名上Alt+Enter,就可以自动生成了
转载于:https://www.cnblogs.com/zhima-hu/p/7449597.html