IDEA Tools - How to use idea to automatically generate serialized id

I reported a serialization error during the conversion between entity classes and json before. I realized that entity classes need to be serialized. Later, I encountered serialization errors because there would be conflicts when serializing the same entity class. I Baidu As a result, I want to add a serialized id, but some ideas do not have their own plug-ins that automatically generate serialized ids. I don’t know what other versions look like, but this version I use does not need to download the plug-in. The specific operation as follows


Other people's plug-ins are in the same directory as java, and my version is set in java


tick this place

After the setting is complete, implement the java.io.Serializable interface in the entity class, then select the entity class name and use the shortcut key Alt + Enter (Enter)



Selecting the first one will generate the serialVersionUID

Guess you like

Origin blog.csdn.net/fengling_smile/article/details/123784501