Intellij IDEA Settings on Mac and Windows
1. IntelliJ Idea -> Preferences -> Editor -> Inspections -> Java -> JVM languages -> Serializable class without serialVersionUID -> set flag and click 'OK'. (For Windows: settings is underFile -> Settings -> Editor ...)
2. If your class implements Serializable, hover over the class name(for example Employee) and click on the 'Create constant field 'serialVersionUID' in classname' as shown below in the image.
3. Finally, a new serialVersionUID is auto-generated.
That's all for today, please mention in the comments in case you have any questions related to how to generate serialVersionUID in IntelliJ IDEA.
0 Commentaires