Intellij IDEA automatically generates serialVersionUID

forward from

http://blog.51cto.com/tonycody/1401422

https://www.cnblogs.com/guanghuiqq/archive/2012/07/18/2597036.html

Students who use Eclipse or MyEclipse may know that if implements Serializable interface, you will be prompted to generate serialVersionUID.

But Intellij IDEA does not enable this feature by default.

Setting->Inspections->Serialization issues->Serializable class without ’serialVersionUID’

wKiom1NX1sug1FwrAAbWJcq54vg146.jpg

After selecting the above, in your class: the cursor is positioned before the class name, and pressing Alt+Enter will prompt to automatically create serialVersionUID.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325449849&siteId=291194637